3 ms·
Startup time is only relevant in specific cases, and doesn’t really reflect what most people think of as the language speed. It’s most important in serverless a
by keypusher 7y ago
Startup time is only relevant in specific cases, and doesn’t really reflect what most people think of as the language speed. It’s most important in serverless apps or similar cases where a small script is going to be called very frequently and the results are time critical, in most other cases it is very quickly made irrelevant by the duration of the task itself. For example, Java and C# start up slower than many interpreted languages, but can be significantly faster once they get going. I suggest a more accurate benchmark to be something that include some file io, string processing, arithmetic, and some basic data structure operations. I have an idea I might code up later.
- nneonneo 7y agoOne of the key use-cases for Perl 5 in scripts was as a replacement for sed/grep/awk. In a makefile or batch processing script, these can get called hundreds to thousands of times per second effortlessly. With a startup time of .2s, you could only start a Perl 6 interpreter 5 times per second, which is a major slowdown and eliminates it from this class of use-cases.
- ccashell 7y agoIf you're doing some sort of processing where you're calling an external script hundreds or thousands of times, you're probably doing it wrong. You should be writing it to get called once and process your input as it comes in. That goes regardless of language. If you're calling an external "thing" thousands of times to process something, you're going to have issues with performance because the approach to processing the data is bad. You can get away with it to a point by using only the most simple and basic of tools (cat/cut/tr/echo/grep/etc), but one of the common reasons that shell scripts get rewritten in Perl/Python/etc is to process data without making hundreds of thousands of calls to spawn external processes.