Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created March 25, 2018 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/22df1dc3cb3a1b714f5bad42b38bb4ef to your computer and use it in GitHub Desktop.
Save Whateverable/22df1dc3cb3a1b714f5bad42b38bb4ef to your computer and use it in GitHub Desktop.
benchable6
compare HEAD my @a = 1 xx 10000; +@a for ^1000000 ||| my @a = 1 xx 10000; @a.elems for ^1000000 ||| use nqp; my $a := nqp::list_i; nqp::push_i($a,1) for ^10000; nqp::elems($a) for ^1000000
¦HEAD: «Benchmark:
Timing 10 iterations of 0, 1, 2...
0: 4.3324 wallclock secs @ 2.3082/s (n=10)
1: 1.0827 wallclock secs @ 9.2361/s (n=10)
2: 1.7246 wallclock secs @ 5.7985/s (n=10)
O---O--------O------O------O------O
| | Rate | 1 | 0 | 2 |
O===O========O======O======O======O
| 1 | 9.24/s | -- | 300% | 59% |
| 0 | 2.31/s | -75% | -- | -60% |
| 2 | 5.80/s | -37% | 151% | -- |
-----------------------------------
»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment