[Python-Dev] Should standard library modules optimize for CPython? (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Sun Jun 1 14:31:17 CEST 2014
- Previous message: [Python-Dev] Should standard library modules optimize for CPython?
- Next message: [Python-Dev] Should standard library modules optimize for CPython?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 1 Jun 2014 18:13, "Steven D'Aprano" <steve at pearwood.info> wrote:
My feeling is that the CPython standard library should be written for CPython, that is, it should stick to the current naive implementation of median, and if PyPy wants to speed the function up, they can provide their own version of the module. I should not complicate the implementation by trying to detect which Python the code is running under and changing algorithms accordingly. However, I should put a comment in the module pointing at the tracker issue. Does this sound right to others?
One option is to set the pure Python module up to be paired with an accelerator module (and update the test suite accordingly), even if we don't provide an accelerator in CPython. That just inverts the more common case (where we have an accelerator written in C, but another implementation either doesn't need one, or just doesn't have one yet).
Cheers, Nick.
Thanks,
-- Steve
Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20140601/5afec8fe/attachment.html>
- Previous message: [Python-Dev] Should standard library modules optimize for CPython?
- Next message: [Python-Dev] Should standard library modules optimize for CPython?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]