3 ms·
It could be, but remember that python optimizes a lot IO and string manipulation (runtime in C). Based on how the feature list has changed perhaps I tried Nim e
by nudpiedo 8y ago
It could be, but remember that python optimizes a lot IO and string manipulation (runtime in C). Based on how the feature list has changed perhaps I tried Nim even earlier than what I said. I also did not want to look for any optimizations since I just used bare constructs and no libs.
- beagle3 8y agoHash tables in nim require pulling in the standard library and are built-in in Python. If you didn’t even “import tables”, you were likely comparing O(1) apples to O(n) oranges.
- nudpiedo 8y agohowever I did it I am sure I used (imported or not) hash tables or similar from stdlib (no algorithm complexity difference in this regard). But based on the comments from everyone it is reasonable to say that my implementation had something wrong or the test was off in some regard.