News for hackers. Stuff that matters.
Re:Why Python is Slow: Looking Under the Hood (2014) by hasenj on Wednesday October 25, 2017 @08:04PM (#15555343)
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.

There are no comments on this comment yet.