[Cython] GSoC Proposal - Reimplement C modules in CPython's standard library in Cython.

Stefan Behnel stefan_ml at behnel.de
Fri Apr 8 08:50:35 CEST 2011


Robert Bradshaw, 08.04.2011 01:08:
> On Thu, Apr 7, 2011 at 2:31 PM, Arthur de Souza Ribeiro wrote:
>> I've submitted to google the link
>> is: http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/arthur_sr/1#
>> It would be really important if you could give me a feedback to my
>> proposal...
>> Thank you
>> Best Regards
>> Arthur
>
> Some quick points:
>
> - Python ships with extensive regression tests--use (and possibly
> augment) those to test your work rather than writing your own.
> - Three modules for a whole summer seems a bit weak, especially for
> someone who already knows Cython. Target at least one module/week
> seems like a good pace; some will be quickies, others might take 40+
> hours. And I guarantee you'll get better and faster with practice.

Absolutely. There certainly are tricky parts in the C code, and optimising 
the Cython/Python code won't come for free, either, but after a little bit 
of exercise this should run quite fluently.


> - Now that generators are supported, it could also be interesting to
> look at compiling all the non-C modules and fixing exposed bugs if
> any, but that might be out of scope.
>
> What I'd like to see is an implementation of a single simple but not
> entirely trivial (e.g. not math) module, passing regression tests with
> comprable if not better speed than the current C version (though I
> think it'd probably make sense to start out with the Python version
> and optimize that). E.g. http://docs.python.org/library/json.html
> looks like a good candidate.

Right, that's a good one. Clearly more maintenance critical than purely 
time critical, and likely a good candidate for making it both more Python 
compatible (function argument handling?) and maybe even faster than the 
original. And if it can be implemented/optimised in Python syntax, that'd 
drop the maintenance overhead of the binary module by some 99%.


> That should only take 8 hours or so,
> maybe two days at most, given your background. I'm not expecting
> anything before the application deadline, but if you could whip
> something like this out in the next week to point to that would help
> your application out immensely.

+1


> In fact, one of the Python
> foundation's requirements is that students submit a patch before being
> accepted, and this would knock out that requirement and give you a
> chance to prove yourself. Create an account on https://github.com and
> commit your code into a new repository there.

Maybe even clone it from CPython's own stdlib repository in hg.

Stefan


More information about the cython-devel mailing list