Hacker News new | past | comments | ask | show | jobs | submit login

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)



No, it was compiled but without --release as I couldn't get it working on OS X Sierra.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: