Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created September 16, 2020 14:18
Show Gist options
  • Save Whateverable/dd3eb829782403543b22b6e594cc3371 to your computer and use it in GitHub Desktop.
Save Whateverable/dd3eb829782403543b22b6e594cc3371 to your computer and use it in GitHub Desktop.
benchable6
compare HEAD my Int $a; for ^100_000 -> Int $x { $a = $x * $x }; ||| my Int $b; for ^100_000 -> Int $y { $b = $y ** 2 }; ||| my Int $c; for ^100_000 -> Int $z { $c = $z² }
¦HEAD: «Benchmark:
Timing 10 iterations of 0, 1, 2...
0: 0.193 wallclock secs (0.188 usr 0.000 sys 0.188 cpu) @ 51.749/s (n=10)
(warning: too few iterations for a reliable count)
1: 0.557 wallclock secs (0.560 usr 0.000 sys 0.560 cpu) @ 17.959/s (n=10)
(warning: too few iterations for a reliable count)
2: 0.781 wallclock secs (0.792 usr 0.000 sys 0.792 cpu) @ 12.801/s (n=10)
(warning: too few iterations for a reliable count)
O---O--------O------O------O------O
| | Rate | 0 | 1 | 2 |
O===O========O======O======O======O
| 0 | 51.7/s | -- | -65% | -75% |
| 1 | 18.0/s | 189% | -- | -29% |
| 2 | 12.8/s | 305% | 40% | -- |
O---O--------O------O------O------O
»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment