5 ms·
Completely anecdotal: - In my small benchmarks, Crystal is very fast - In benchmarks not my own, Crystal is very fast - Crystal has a very nice batteries inclu
by totalperspectiv 6y ago
Completely anecdotal:
- In my small benchmarks, Crystal is very fast
- In benchmarks not my own, Crystal is very fast
- Crystal has a very nice batteries included stdlib.
Benchmarks that aren't mine: http://lh3.github.io/2020/05/17/fast-high-level-programming-languages http://lh3.github.io/2020/05/17/fast-high-level-programming-...
The only other language that is high level in its ballpark is D.
- mratsim 6y agoBenchmarking strings is often benchmarking memory allocation speed or the GC. If you manipulate strings day in day out in your workflow, the first thing you do is remove all those allocations and for what is left you use a memory pool. The speedup could easily go into the 20x in any language. It's actually one of the area where Python or JS can beat statically typed languages, they focused a lot into optimizing strings while statically typed languages often leave that as an exercise to the reader.
- throwaway894345 6y ago> It's actually one of the area where Python or JS can beat statically typed languages, they focused a lot into optimizing strings while statically typed languages often leave that as an exercise to the reader. I think this has more to do with writing the string handling functions in heavily-optimized C rather than in Python/JS than it does with memory tricks, but I'll happily accept correction.
- totalperspectiv 6y agoThe article linked is doing much more than benchmarking string operations. I'd even argue that string allocations are about as minimal as possible with the algorithms used. The C version takes this a little farther, but each of the other implementations are pretty similar. I don't disagree that benchmarks should be taken with a mound of salt though.