News for hackers. Stuff that matters.
Re:Ruby vs. Crystal Performance by timon999 on Friday June 05, 2020 @03:38PM (#23432944)
This article by one of the Crystal developers explains why this comparison is not fair: https://crystal-lang.org/2016/07/15/fibonacci-benchmark.html.

> When doing operations between integers, Ruby will make sure to create a Bignum in case of overflow, to give a correct result.

> Now we can understand why Ruby is slower: it has to do this overflow check on every operation, preventing some optimizations. Crystal, on the other hand, can ask LLVM to optimize this code very well, sometimes even letting LLVM compute the result at compile time. However, Crystal might give incorrect results, while Ruby makes sure to always give the correct result.

Re:Ruby vs. Crystal Performance by htns on Friday June 05, 2020 @07:42PM (#23435260)
Since late last year crystal made overflow checking the default (https://crystal-lang.org/2019/09/23/crystal-0.31.0-released....). Dunno how it changed the benchmark.
Re:Ruby vs. Crystal Performance by ksec on Friday June 05, 2020 @03:40PM (#23432968)
You may want to edit the link.
Re:Ruby vs. Crystal Performance by timon999 on Friday June 05, 2020 @03:42PM (#23432995)
Whoops. Thank you!