[Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements (original) (raw)
Michael Foord fuzzyman at voidspace.org.uk
Wed Apr 6 16:17:05 CEST 2011
- Previous message: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements
- Next message: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 05/04/2011 20:57, Raymond Hettinger wrote:
[snip...] [Brett]
(sorry, Raymond, for picking on heapq, but is was what bit the PyPy people most recently =). No worries, it wasn't even my code. Someone donated it. The was a discusion on python-dev and collective agreement to allow it to have semantic differences that would let it run faster. IIRC, the final call was made by Uncle Timmy.
The major problem that pypy had with heapq, aside from semantic differences, was (is?) that if you run the tests against the pure-Python version (without the C accelerator) then tests fail. This means they have to patch the CPython tests in order to be able to use the pure Python version.
Ensuring that tests run against both (even if there are some unavoidable differences like exception types with the tests allowing for both or skipping some tests) would at least prevent this happening.
All the best,
Michael
That being said, I would like to see a broader set of examples rather rather than extrapolating from a single piece 7+ year-old code. It is purely algorithmic, so it really just represents the simplest case. It would be much more interesting to discuss something what should be done with future C implementations for threading, decimal, OrderedDict, or some existing non-trivial C accelerators like that for JSON or XML.
Brett, thanks for bringing the issue up. I've been bugged for a good while about issues like overbroad use of the concrete C API.
Raymond
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
-- http://www.voidspace.org.uk/
May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html
- Previous message: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements
- Next message: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]