3 ms·
I cannot edit my previous comment but just now I revisited the code and noticed there was an import inside the function measuring the distance. One I moved the
by hasenj 9y ago
I cannot edit my previous comment but just now I revisited the code and noticed there was an import inside the function measuring the distance. One I moved the import out of the function, the execution time was cut by a bit more than half, to about 20ms.
The go version runs in about 3ms, not 6ms.
The D version runs in 2ms.
So overall the python version is 10x slower than native, not 20x slower.
Which is still kind of bad.