Post Reply 
N-Queens on 50g (RPL language)
11-26-2014, 05:32 AM (This post was last modified: 11-26-2014 01:32 PM by Claudio L..)
Post: #19
RE: N-Queens on 50g (RPL language)
I finally had the time to get some results in.
The following code was tested on a 50g under userRPL and newRPL under various precision settings.
Code:

<< 0. 1000. 0.1 FOR n
   0.02 n DUP 0.1 + * / +
   -0.1 STEP
>>

The times resulted as follows:

userRPL = 87.4 seconds
newRPL = 0.893 seconds (at 36 digits precision)
newRPL = 1.615 seconds (at 108 digits precision)
newRPL = 10.843 seconds (at 1008 digits precision)

A few observations from these results:
a) newRPL vs userRPL shows a speedup of 98x. Not as impressive as the 200x obtained in integer math, but still good, especially considering it's using 36-digit precision vs. 12-digits in userRPL.
b) Execution time seems to be growing fairly linear with precision, which is somewhat unexpected (at least for multiplication and division, which should have a big influence on this test).
c) Since the multiplication involves numbers of known precision (variable n), the time used in the multiplication in this test should be independent of the precision. In this case, the division and the last addition are the only operations affected by the selected precision (not sure if that is enough to justify the linear behavior).

Claudio
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) - Bruno - 09-08-2015, 10:41 AM
RE: N-Queens on 50g (RPL language) - Han - 11-20-2014, 08:53 AM
RE: N-Queens on 50g (RPL language) - Claudio L. - 11-26-2014 05:32 AM



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