3 ms·
I profiled my attempt, actually reading each line is the bottleneck.
by gerikson 3y ago
I profiled my attempt, actually reading each line is the bottleneck.
- lessbergstein 3y agoPerl is always going to be much faster than Java at tasks like this. Use stdin and chomp() instead of reading each line explicitly. This is really a small, trivial task for a perl script. Even with a billion lines this is nothing for a modern cpu and perl.
- gerikson 3y ago/r/perl would beg to differ: https://www.reddit.com/r/perl/comments/18ygpsi/1_billion_row_challenge_in_perl/kgbzpjz/ https://www.reddit.com/r/perl/comments/18ygpsi/1_billion_row...
- lessbergstein 3y agoReddit?