[pypy-dev] Should jitviewer come with a warning?

John Camara john.m.camara at gmail.com
Sun Feb 3 21:29:22 CET 2013


> Also, looking at the msgpack - this code is maybe not ideal, but if
> you're dealing with buffer-level protocols, you end up with code
> looking like C a lot.

I do agree that this type a code will likely end up looking like C but it's
not necessary for all of it to look like c.  Like there should be a need to
have long chains of if, elif statements.  Using pack_into and unpack_from
instead of pack and unpack methods so that it directly deals with the
buffer instead of making sub strings.  Even if pypy can optimize this away
why write Python code like this when its not necessary.

Plus I felt, initially the code should just use cffi and connect to the
native c library.  I believe this approach is likely to give very close to
the best performance you could get on pypy for this type of library.  I'm
not sure how much of an increase in performance would be gain by writing
the library completely in Python vs using cffi.  Is there anything wrong
with this line of thinking.  Do you feel a pure Python approach could
achieve better results than using cffi under pypy.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20130203/571e6d2e/attachment.html>


More information about the pypy-dev mailing list