4 ms·
Crystal is quite interesting, but a fib benchmark?
by mhd 6y ago
Crystal is quite interesting, but a fib benchmark?
- WJW 6y agoI mean it's kinda trivial but it does have the added benefit of also showing off that it's statically typed. For a more real world example check out the website of Kemal (Crystals Sinatra equivalent) at https://kemalcr.com/ https://kemalcr.com/, where it benchmarks at ~46k requests per second in a HTTP benchmark vs 4k in Ruby.
- ksec 6y agoOr something like Sidekiq in Crystal [1], which was 7 times faster. But now I wonder how much faster would Sidekiq run on TuffleRuby. [1] https://github.com/mperham/sidekiq.cr https://github.com/mperham/sidekiq.cr
- WJW 6y agoI'd be amazed if TruffleRuby could beat Crystal, given the problems most JITs have had with Ruby. By restricting the extreme dynamism of Ruby a bit, Crystal can allow for optimalisations that no Ruby implementation will be able to match. It's just really difficult to properly compile languages where it's possible to dynamically redefine the + operator based on input from HTTP requests. That said, Truffle is looking super cool and Crystal does not have anything near the size and quality of the Ruby ecosystem yet.
- deleted 6y ago[deleted]