Last active
August 29, 2015 14:19
-
-
Save skids/255ade0fc1b2709e22b3 to your computer and use it in GitHub Desktop.
performance of a zip in for's list.
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
$ time perl6 -e 'my @a = (^64); my @b = (^64); my $i = 0; while ($i++ < 1000) { for @a Z @b -> $a, $b { } }' | |
real 0m11.031s | |
user 0m10.992s | |
sys 0m0.032s | |
$ time perl6 -e 'my @a = (^64); my @b = (^64); my @c = @a Z @b; my $i = 0; while ($i++ < 1000) { for @c -> $a, $b { } }' | |
real 0m0.900s | |
user 0m0.876s | |
sys 0m0.020s | |
$ time perl6 -e 'constant @a = (^64); constant @b = (^64); my $i = 0; while ($i++ < 1000) { for @a Z @b -> $a, $b { } }' | |
real 0m10.813s | |
user 0m10.788s | |
sys 0m0.020s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment