On 13 February 2015 at 20:33, Victor Stinner <victor.stin...@gmail.com> wrote: > 2015-02-13 11:19 GMT+01:00 Paul Moore <p.f.mo...@gmail.com>: >> On 13 February 2015 at 10:07, Victor Stinner <victor.stin...@gmail.com> >> wrote: >>> => IMO the best option is to take the C implementation. What do you think? >> >> FWIW (as I'm not a core dev) I agree. The Windows speedup is huge, and >> well worth adding the code. I'm assuming that the majority of the C >> code is cross-platform, so we're not adding a big chunk of code >> needing *both* Windows and C skills to maintain (any dev with C skills >> could handle it). >> >> Paul > > The patch can be read here: > http://bugs.python.org/file36963/scandir-2.patch > > Or using Rietveld: > http://bugs.python.org/review/22524/#ps13104 > > The C code is quite simple. It takes 800 lines because C code is more > "verbose" than Python code. Manipulate strings, manage memory, take > care of the reference counter, etc. just takes more lines.
This isn't code I'd expect us to have to change very often, so the maintenance risks associated with the pure C implementation seem low. Having it in a separate file rather than making the main implementation file for os even larger does seem like an attractive structural option though. Regards, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com