Post Reply 
How much memory may a HPPL program use on a G2?
09-09-2023, 11:20 AM
Post: #23
RE: How much memory may a HPPL program use on a G2?
Hi Stefan,

(09-09-2023 10:50 AM)Stefan Falk Wrote:  In this specific program, I only need to know if or of not a given solution was already found (just rotated or mirrored), but the number of that existing solution is only interesting for displaying it. Also, all of my substrings would be of the same size, so I could easily compute the solution number from the INSTR position.
I've already modified the implementation of your algorithm on my HP Prime by editing a few lines of code, so I know the test results Wink The execution time of the QUEENS algorithm increases exponentially with the size of the board. For a 12x12 board, there are over 14,000 solutions, for 13x13 over 73,000, and for 14x14, it already exceeds 350,000. The computation time on a real HP Prime takes several hours. Even on the emulator, it took a long time (if I remember correctly, it was about 1.5-2 hours), but eventually, I managed to get the result for 14x14.

In my opinion, the program itself needs optimization because it redraws the solution from scratch each time, which significantly slows down the program. You should draw the board once, buffer it in G1, and then use BLIP_P to draw it 'in one go' while changing the presentation of solutions in each iteration. This should greatly reduce the time needed to find a solution.

(09-09-2023 10:50 AM)Stefan Falk Wrote:  Something like a hash table does not exist in the Prime, does it?
Unfortunately not.

Piotr Kowalewski
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-09-2023 11:20 AM



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