Post Reply 
N-Queens on 50g (RPL language)
11-19-2014, 03:19 PM
Post: #14
RE: N-Queens on 50g (RPL language)
(11-18-2014 07:39 AM)Werner Wrote:  As for SysRPL, here's a quick transcript of the RPL:
Interesting.
On the 50g, your sysRPL version clocked 2.318 seconds (average of 5 runs doing MEM right before). Not bad at all!
In the list, it fits right in line with the WP-34S (2.1/2.3 seconds).

Comparing this result with your algorithm written in userRPL shows a speedup of sysRPL vs userRPL of almost 10x. Then from sysRPL to newRPL the speedup is 16x, but since it's running at 192 MHz, the real gain due to bypassing the Saturn layer is around 6.4x (at the same clock speed).

Normalizing results, for language efficiency comparison only:

userRPL = 1.0x (by definition)
sysRPL = 9.75x (speedup due to BINT use, lost argument safety checks)
newRPL = 62.6x (speedup due to emulation layer, at 75 MHz)

Notice that sysRPL loses all safety checks to increase efficiency, newRPL and userRPL have all safety checks in place. newRPL uses BINTs automatically, so it's closer to sysRPL than userRPL in this aspect.
N-Queens does not make heavy use of basic arithmetic operations on reals, so it's more oriented towards loop efficiency and integer math/counters. I've been toying with other tests that do some number crunching (mainly some PI finding algorithms, some series expansions, etc). The idea is to measure real computing speed (real as in real numbers), but I can't find a good algorithm, so any ideas are welcome.

Here's a couple of examples, but none of them work for what I want to measure:

Simple product that converges to PI/2:
Code:

<< 1. .5 √ 1. 100. START
           DUP ROT * SWAP .5 * .5 + √ NEXT
 * INV 2. *
 >>

Archimedes's method of finding PI:
Code:

<<
4. 3. √ * 6. -> a b
<< 1. 100. START 
2. a b * * a b + / 'a' STO b a * √ 'b' STO
NEXT a 2 /
>>
>>

Both examples are not good because products that converge tend to 1, and after a few terms, it all becomes "multiply by 1". It's also very fast in userRPL, which makes it difficult to measure in newRPL.

What other problems could we use to benchmark real numbers?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: N-Queens on 50g (RPL language) - Han - 11-06-2014, 03:29 AM
RE: N-Queens on 50g (RPL language) - Claudio L. - 11-19-2014 03:19 PM
RE: N-Queens on 50g (RPL language) - Bruno - 09-08-2015, 10:41 AM
RE: N-Queens on 50g (RPL language) - Han - 11-20-2014, 08:53 AM



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