4 ms·
I'm always wary of these kinds of sub-second benchmarks because more often than not you've only accidentally measured just the compilation and startup times. I
by csirac2 12y ago
I'm always wary of these kinds of sub-second benchmarks because more often than not you've only accidentally measured just the compilation and startup times.
I might have some bias though from speeding up a crusty old Perl CGI web apps with multi-second request times down to less than 100ms simply by keeping the perl processes persistent with mod_fcgid or whatever.
- haberman 12y ago> I'm always wary of these kinds of sub-second benchmarks because more often than not you've only accidentally measured just the compilation and startup times. I increased the iteration count by 10x and observed exactly the same pattern: $ time perl -ne 'print if /number 12345/' < file [...] real 0m1.661s user 0m1.586s sys 0m0.076s $ time grep "number 12345" file [...] real 0m0.188s user 0m0.132s sys 0m0.056s
- csirac2 12y agoCool, thanks for entertaining my superstitions :)