3 ms·
> * python 3 (without any library or optimization) was faster than compiled nim to count words on a moderately large text. I'm sure many other commenters have
by ilitirit 8y ago
> * python 3 (without any library or optimization) was faster than compiled nim to count words on a moderately large text.
I'm sure many other commenters have singled out this comment, but do you have an example? I find this quite hard to believe. Surely this would have manifested elsewhere and people would have pointed it out ages ago? Nim compiles (or transpiles, if you prefer) to C/C++, after all.
- nudpiedo 8y agoIt was very straightforward code looping, counting and storing strings in memory and writing to a file, after 2 years or more I do not keep the code anymore, sorry. Looking in perspective my guess is that the optimized C runtime of python (IO and optimized string references) competed against Nim's bare strings.