Hacker News new | ask | show | jobs
by ulrich 5421 days ago
If you leave aside C-extensions and libraries, CPython is a pretty bad language for number crunching. This is just not the use-case it tries to solve. I am glad they favor simplicity over execution speed.

Removing the GIL might be useful for a faster implementation with JIT compiler though.

2 comments

CPython has numpy which rocks for number crunching.
And has no GIL problems.
This is not exactly true. We can alleviate the GIL issue by releasing it inside C extensions, true, but it is still there nonetheless. Incidentally, one of the big advantage of the GIL is to make C extensions easier to write.
You can then call it The GIL Advantage ;-)

As long as you are not creating or destroying the Python objects you expect to give back to the Python side of your program, you don't have to care much about it.

CPython is a pretty bad language for number crunching

Perhaps, but thanks to numpy, scipy and a host of other amazing libraries it still ties with matlab as the go to language for number crunching among everyone I know who crunches numbers for a living.