4 ms·
> The gulf between Python and Go isn't a matter of a few dozen percent, it's a matter of a few dozen times in terms of speed and generally substantial integer m
by takeda 3y ago
> The gulf between Python and Go isn't a matter of a few dozen percent, it's a matter of a few dozen times in terms of speed and generally substantial integer multiples on memory use too.
I think here is your problem. You're expecting dynamically typed, interpreted language to be comparable to statically typed compiled language.
Python is best used as a glue language, or when performance is not critical.
That doesn't mean you can't have fast code with python. I for example was able to encode a live video into using x264 then steam it over the Internet in python, then on the other side receive the data, decode and display it.
Though the encoding/decoding was done by a C code that was interacted with through python package.
I suppose I could have the whole thing done in C, but then my code would be more complex and longer. It will also be harder to iterate on it.
- hgftr 3y agoI don't see the GP expecting anything. GP talks about good engineering decisions, using C-extensions when appropriate would be one of those. But C-extensions don't require the small speedups and additional interpreter complexity that this project brings.