Post Reply 
How much memory may a HPPL program use on a G2?
09-20-2023, 04:20 AM
Post: #75
RE: How much memory may a HPPL program use on a G2?
(09-19-2023 07:29 PM)Tyann Wrote:  I continued to look at your code this evening, the part where you know the first letter
and I realised that if the word starts with C???... you look for the index of the word >BZZZ...
and the index of the word <DAAA..., so with my organisation of 26 sub-lists I do the same thing, taking the ascii code of the first letter -96 = number of the sub-list to be explored and that alone.
This changed in the latest version (rc1), which I released yesterday. Due to a minor optimization, I now simply decrease the last character by 1, leaving the '?' characters unchanged. This is enough to find the first word in the range because '?' is smaller than 'A', so the first letter can remain as entered, and there is no need to go back to an earlier letter in the alphabet. For the last word in the range, I change all '?' characters to 'Z' and additionally increment the last character by 1. This only shortened the search range in a few cases, but it's always some extra optimization. However, in the case of "sc???r???", it was possible to reduce the search time to 0.6 - 0.8s (previously 1.0 - 1.3s).

(09-19-2023 07:29 PM)Tyann Wrote:  However, my searches take longer than yours, so I conclude that accessing strings is faster than accessing lists, as you said.
Yes, in the current firmware version (14730), lists in PPL do indeed work slower than text strings, although in the past, in much older firmware versions, it was the opposite, and lists worked faster. You never know if this will change again with the next firmware version.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How much memory may a HPPL program use on a G2? - komame - 09-20-2023 04:20 AM



User(s) browsing this thread: 1 Guest(s)