I guess it depends, for one-off tasks you'll have to compile and run the Crystal code. I assume you ran the code above with `crystal run`. If you first compile the code with `crystal build --release` and run it, you should see a dramatic improvement over Ruby.
On my machine, parsing a 374MB file took:
- 25.63 using Ruby
- 19.97 using Crystal (run w/o optimizations)
- 19.01 using Crystal (compiled w/o optimizations)
- 18.68 using Crystal (run w/ `--release` flag)
- 11.54 using Crystal (compiled w/ `--release` flag)
On my machine, parsing a 374MB file took: