HP Forums
WP-34S N-Queens Benchmark taking too long - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: WP-34S N-Queens Benchmark taking too long (/thread-2283.html)



WP-34S N-Queens Benchmark taking too long - iceman - 10-12-2014 11:20 PM

I notice the WP-34S Benchmark takes about 5 seconds, which is longer than shown in Xerxes' article

Has anyone else noticed this?

This is the code, starting at program location 1

I include that .dat file of this program from the emulator for verification

Code:
WP-34S
--------


 001: LBL B
 002: CLREG
 003: 8
 004: STO 11
 005: RCL 11
 006: x=? 00
 007: SKIP 22
 008: INC 00
 009: STO ->00
 010: INC 10
 011: RCL 00
 012: STO 09
 013: DEC 09
 014: RCL 09
 015: x=0?
 016: BACK 11
 017: RCL ->00
 018: RCL- ->09
 019: x=0?
 020: SKIP 05
 021: ABS
 022: RCL 00
 023: RCL- 09
 024: x<>? Y
 025: BACK 12
 026: DSZ ->00
 027: BACK 17
 028: DSZ 00
 029: BACK 03
 030: RCL 10
 031: RTN



RE: WP-34S N-Queens Benchmark taking too long - Paul Dale - 10-12-2014 11:35 PM

What firmware revision are you running?

Those results are for v2 firmware which is quite a bit faster than v3 -- we needed more bytes and finding them cost time.


- Pauli


RE: WP-34S N-Queens Benchmark taking too long - iceman - 10-12-2014 11:51 PM

Thanks very much for the quick reply Pauli. That would explain it. I am running 34S 3.3T Build 3678.


RE: WP-34S N-Queens Benchmark taking too long - patrice - 10-21-2014 12:10 AM

Hi Paul,

a little question.
Can you tell me if the 34S have functions to convert a program from LBL/GTO to BACK/SKIP and reverse ?


RE: WP-34S N-Queens Benchmark taking too long - Paul Dale - 10-21-2014 12:56 AM

(10-21-2014 12:10 AM)patrice Wrote:  Can you tell me if the 34S have functions to convert a program from LBL/GTO to BACK/SKIP and reverse ?

There is no capability to do this on the device.


There is a stand alone assembler written in Perl that handles this for us for internal code and libraries, although not by converting from one to the other as such. The assembler has the ability to automatically generate both styles of branch based on the distance to be jumped. You can, of course, force it to use one or the other.


Use LBL / GTO unless you're working on a challenge to minimise the number of steps. In that case, use LBL / GTO until everything else is minimised and then convert. BACK / SKIP make for unmaintainable code.


- Pauli


RE: WP-34S N-Queens Benchmark taking too long - patrice - 10-21-2014 12:24 PM

(10-21-2014 12:56 AM)Paul Dale Wrote:  
(10-21-2014 12:10 AM)patrice Wrote:  Can you tell me if the 34S have functions to convert a program from LBL/GTO to BACK/SKIP and reverse ?
There is no capability to do this on the device.
- Pauli
Too bad
Would have been nice to be able to switch directly on the device.