Post Reply 
General info on 48/49/50 ROM entry points
01-01-2018, 04:43 PM
Post: #13
RE: General info on 48/49/50 ROM entry points
(01-01-2018 04:10 PM)grsbanks Wrote:  Just to test this very quickly I ran 2000 multiplications of two standard reals in one program and two extended reals in another.

There's a 10% or so difference in speed, so nothing huge.

I think that most of the time is used up by stack manipulation here. What I should do is try with something more complex than multiplication. Involve some trig and/or logarithmic functions.

Stack manipulation (especially in SysRPL) is very fast. A short loop using %+ and %SQRT vs. %%+ and %%SQRT gave the following results:

%+: 2.74047851562
%%+: 2.02880859375
(5000 iterations, %+ was 35% slower than %%+)

%+ %SQRT: 7.46215820312
%%+ %%SQRT: 6.84362792969
(3000 iterations, %+ %SQRT was 9% slower than %%+ %%SQRT)

Here's the code I ran:
Code:
::
   CK0NOLASTWD

   GARBAGE
   %1
   %0
   SysTime UNROT
   5000 ZERO_DO (DO)
      OVER %+
   LOOP
   SysTime
   UNROT2DROP SWAP
   bit- HXS>% % 8192 %/
   "%+" >TAG

   GARBAGE
   %%1
   %%0
   SysTime UNROT
   5000 ZERO_DO (DO)
      OVER %%+
   LOOP
   SysTime
   UNROT2DROP SWAP
   bit- HXS>% % 8192 %/
   "%%+" >TAG

   GARBAGE
   %1
   %0
   SysTime UNROT
   3000 ZERO_DO (DO)
      OVER %+ %SQRT
   LOOP
   SysTime
   UNROT2DROP SWAP
   bit- HXS>% % 8192 %/
   "%+ %SQRT" >TAG

   GARBAGE
   %%1
   %%0
   SysTime UNROT
   3000 ZERO_DO (DO)
      OVER %%+ %%SQRT
   LOOP
   SysTime
   UNROT2DROP SWAP
   bit- HXS>% % 8192 %/
   "%%+ %%SQRT" >TAG
;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: General info on 48/49/50 ROM entry points - DavidM - 01-01-2018 04:43 PM



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