5 ms·
$ time perl -E 'say "hello world"' hello world real 0m0.016s user 0m0.005s sys 0m0.007s $ time perl6 -e 'say "hello world"' hello world real 0m0.187s user 0m
by Ultimatt 7y ago
$ time perl -E 'say "hello world"'
hello world
real 0m0.016s
user 0m0.005s
sys 0m0.007s
$ time perl6 -e 'say "hello world"'
hello world
real 0m0.187s
user 0m0.226s
sys 0m0.032s
That is not 100x slower, 10x sure. But once its running its faster than Perl 5 in plenty of situations especially for things like heavy OO use or compact numeric work in tight loops. Anyone who argues Perl 6 is fast is definitely being disingenuous but the counter is almost certainly more annoying to come across simply because "startup time" is only important if you expect your program to execute in less than a tenth of a second. So tight loops in a shell script for something simple, stick to Perl 5. Large web app that will be running for the next 5 years who cares about 10x slower startup time? Hardly a benchmark thats useful.
- futureastronaut 7y agoAgreed, "Perl 6 is slow" is a ridiculous takeaway from a benchmark of process start times.
- lizmat 7y agoEspecially if you would compare a "Modern Perl 5" startup sequence, which would involve using the `Moose` module (as Perl 6 has that built in). Then startup times are basically the same.
- microtherion 7y agoSo the argument against Perl 6 being slow is "if you use it properly, Perl 5 can be just as slow" ?
- futureastronaut 7y agoIt's more like saying "the conventional P5 runtime is about as heavy as the distributed P6 one", seems fair to me.