Post Reply 
Summation based benchmark for calculators
12-26-2017, 02:39 PM (This post was last modified: 12-26-2017 03:16 PM by grsbanks.)
Post: #45
RE: Summation based test for calculators
Although I'm no SysRPL expert I;ve just given this a shot myself. I'm surprised to note that the speed increase is only about 10%.

If anyone wants to pick holes in it and optimize it further, this is the SysRPL code I used. Note that this is the "loop and add" approach rather than the built-in summation function. I can't see any point in converting the latter to SysRPL.

Code:
::
  CK1NOLASTWD
  CK&DISPATCH1
  BINT1 ::
    %IP>#
    %0
    SWAP
    CLKTICKS
    %3 %1/
    { NULLLAM NULLLAM }
    BIND
      #1+_ONE_DO
        INDEX@
        UNCOERCE
        %ATAN
        %SIN
        %EXP
        1GETLAM %^
        %+
      LOOP
      CLKTICKS
      2GETLAM
      bit-
      HXS>%
      % 8192
      %/
    ABND
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Summation based test for calculators - grsbanks - 12-26-2017 02:39 PM



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