Code-dojo seemed to work well

We decided to use the 21-line spell checker as a sample case for playing with Cython last night. We immediately ran into a few uses of not-yet-supported features (at least, in the default Ubuntu version of Cython), things like lambdas, generator comprehensions, etceteras). We spent a while playing with moving code about in modules to convince ourselves things worked the way we though. We also spent quite a while trying to get something beyond the initial 20% speedup of just copying the file into a .pyx and compiling it... we wound up getting an additional 2% by declaring lots of internal variables string, declaring a few return types as set, etceteras.

What? You call that working well?

Why yes, I do. It worked well because we let new Python users actually code; we had people solving problems together and learning how the others do that; basically it was a reasonable knowledge transfer session, though the knowledge really wasn't about Cython at all, it was more about methods and approaches, with a bit of Cython thrown in.


Comments are closed.


Pingbacks are closed.