3 ms·
Crystal's startup time is not great though. 700ms vs 100ms for ruby. Compared with time crystal eval <<<"puts 1" time ruby <<<"puts 1"
by emmelaich 7y ago
Crystal's startup time is not great though. 700ms vs 100ms for ruby.
Compared with
time crystal eval <<<"puts 1"
time ruby <<<"puts 1"
- bhaak 7y agoYou know that you are timing the compiler and not the compiled program here? Rather try "echo 'puts 1' > puts.cr && crystal build puts.cr && time ./puts" BTW, you can dramatically decrease the cold startup times of ruby if you call it with the options '--disable-gems --disable-rubyopt' if that's an option to you. For many scripts it certainly is. But even on a 8 years old machine with spinning rust, after the ruby stuff is cached in the OS filesystem cache, my startup time are smaller than 10ms.