Created
February 1, 2019 20:31
-
-
Save Whateverable/70b06b2713c088a5d287173da8442f32 to your computer and use it in GitHub Desktop.
benchable6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compare HEAD use nqp; my $a = "foo"; my $b; for ^10_000_000 { $b = nqp::if(nqp::istype($a, Str), $a, $a.Str) }; say $b; ||| use nqp; my $a = "foo"; my $b; for ^10_000_000 { $b = $a.Str }; say $b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
¦HEAD: «Benchmark: | |
Timing 10 iterations of 0, 1... | |
foo | |
foo | |
foo | |
foo | |
foo | |
foo | |
foo | |
foo | |
foo | |
foo | |
0: 9.8118 wallclock secs @ 1.0192/s (n=10) | |
foo | |
foo | |
foo | |
foo | |
foo | |
foo | |
foo | |
foo | |
foo | |
foo | |
1: 5.2851 wallclock secs @ 1.8921/s (n=10) | |
O---O--------O-----O------O | |
| | Rate | 0 | 1 | | |
O===O========O=====O======O | |
| 0 | 1.02/s | -- | -46% | | |
| 1 | 1.89/s | 86% | -- | | |
--------------------------- | |
» |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment