3 ms·
Crystal's performance is simply amazing––not just in comparison with ruby, I recently noticed some Python data-ingestion script was on course to take 12 hours t
by IfOnlyYouKnew 6y ago
Crystal's performance is simply amazing––not just in comparison with ruby, I recently noticed some Python data-ingestion script was on course to take 12 hours to finish. I spent 30 minutes reimplementing it in Crystal, and it took 7 more minutes until it was done!
That was probably a particularly lopsided comparison: lots of CSV and JSON reading, string-mangling, and writing back; it was using Python stdlib functions only, and numpy and similar would have also helped enormously. But I do regularly get factor 100x with all sorts of tasks compared to ruby of python.
That said, Ruby's console (or Pry) is without equivalent in Crystal, and I tend to do most everything on the cli in it. And, as someone already pointed out, the compile cycle is too slow. I've also noticed that even with practice, the intricacies of the type system do slow me down by maybe 30% or so? And the currently existing frameworks are still far away from the ease of whipping up an interface to whatever data you have lying around that Rails offers.