Bystroushaak / tinySelf

Self-like language implemented in the RPython language toolkit.
29 stars 3 forks source link

Add performance test for two pointer array #128

Closed Bystroushaak closed 5 years ago

Bystroushaak commented 5 years ago

Test results for the ._cached_lookup() with regular arrays:

   3824,843478      task-clock (msec)         #    0,995 CPUs utilized
            10      context-switches          #    0,003 K/sec
             0      cpu-migrations            #    0,000 K/sec
         2 043      page-faults               #    0,534 K/sec
13 729 623 632      cycles                    #    3,590 GHz
33 070 608 837      instructions              #    2,41  insn per cycle
 6 537 429 722      branches                  # 1709,202 M/sec
    10 218 895      branch-misses             #    0,16% of all branches

   3,844055222 seconds time elapsed

Test results for the ._cached_lookup() with TwoPointerArray:

   3585,062567      task-clock (msec)         #    0,995 CPUs utilized
            16      context-switches          #    0,004 K/sec
             1      cpu-migrations            #    0,000 K/sec
         2 061      page-faults               #    0,575 K/sec
12 697 148 014      cycles                    #    3,542 GHz
29 448 353 316      instructions              #    2,32  insn per cycle
 5 853 911 883      branches                  # 1632,862 M/sec
     9 148 133      branch-misses             #    0,16% of all branches

   3,604639268 seconds time elapsed

Conclusion: TwoPointerArray is indeed faster (3G5 instructions per benchmark).