Created
May 9, 2010 20:42
-
-
Save xaicron/395390 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| use strict; | |
| use warnings; | |
| use File::Find; | |
| use Win32::Unicode; | |
| use Benchmark qw/cmpthese timethese/; | |
| cmpthese timethese 0, +{ | |
| find => sub { | |
| find sub {}, 'lib'; | |
| }, | |
| win32 => sub { | |
| findW sub {}, 'lib'; | |
| }, | |
| }; | |
| __END__ | |
| # version 0.19 | |
| Benchmark: running find, win32 for at least 3 CPU seconds... | |
| find: 5 wallclock secs ( 0.33 usr + 2.80 sys = 3.13 CPU) @ 157.76/s (n=493) | |
| win32: 3 wallclock secs ( 2.56 usr + 0.45 sys = 3.02 CPU) @ 103.48/s (n=312) | |
| Rate win32 find | |
| win32 103/s -- -34% | |
| find 158/s 52% -- | |
| # XS branch | |
| Benchmark: running find, win32 for at least 3 CPU seconds... | |
| find: 5 wallclock secs ( 0.27 usr + 2.86 sys = 3.13 CPU) @ 152.00/s (n=475) | |
| win32: 4 wallclock secs ( 1.78 usr + 1.84 sys = 3.62 CPU) @ 376.10/s (n=1363) | |
| Rate find win32 | |
| find 152/s -- -60% | |
| win32 376/s 147% -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment