?

Log in

No account? Create an account
July 17th, 2006 - I will do this using Capitalism — LiveJournal [entries|archive|friends|userinfo]
Scott Robinson

website | David Ryland Scott Robinson
userinfo | livejournal userinfo
archive | journal archive

July 17th, 2006

CPython sucks [Jul. 17th, 2006, 08:25 pm]
Scott Robinson
[Tags|]

You heard it here, not exactly first. I hate the GIL. Python is a great language, I recommend it to anyone learning or prototyping. However, I do not recommend it as an implementation language for anything CPU-bound.

Oh, it's said you can use multiple processes, C extensions, psyco, or pyrex. But mostly, those are all lies.

Multiple processes need to be able to communicate between each other, and cPickle isn't GIL friendly so you'll be killed by serialization costs. (And don't talk to me about POSH, it doesn't even work in 2.4.)

C extensions and pyrex both suffer from the GIL, if you want to get data boxed/unboxed. They're also near impossible to get correct without automatic code generation. See also the fact every GNOME/freedesktop binding uses a code generator.

psyco is voodoo magic. It's incredible, when it works. However, don't push it too hard or it might break. This includes fun with the GIL or threading. Oh, and portability.

Fuck you, CPython - I'm sick of defending you. In a month or so, when I'm responsible for several thousand lines of Python code people be caring about, I won't be looking to you anymore. IronPython and Mono seem to have a nice license...

Honestly, I just wish there was a well supported, well implemented VM that wasn't totally proprietary. It would save the computer industry millions of dollars, but no one will ever make the commitment.
Linkflamenco lambada

navigation
[ viewing | July 17th, 2006 ]
[ go | Previous Day|Next Day ]