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

John Camara john.m.camara at gmail.com
Sun Feb 3 18:39:39 CET 2013


I have been noticing a pattern where many who are writing Python code to
run on PyPy are relying more and more on using the jitviewer to help them
write faster code.  Unfortunately, many of them who do so don't look at
improving the design of their code as a way to improve the speed at which
it will run under PyPy but instead start writing obscure Python code that
happens to run faster under PyPy.

I know that at least with the PyPy core developers they would like to see
every one just create good clean Python code and that often code that has
been made into obscure Python was don so to try to optimize it for CPython
which in many cases causes it to run slower on PyPy than it would run it
the code just followed typical Python idioms.

I feel that a normal developer should be using tools like cProfiler and
runsnakerun and cleaning up design issues way before they should even
consider using jitviewer.

In a recent case where I saw someone using the jitviewer who likely doesn't
need to use it.  At least they don't need to use it considering the current
design of the code I said the following

"The jitviewer should be mainly used by PyPy core developers and those
building PyPy VMs. A normal developer writing Python code to run on PyPy
shouldn’t have a need to use it. They can use it to point out an
inefficiency that PyPy has to the core developers but it should not be used
as a way to get you to write Python code in a way that has a better chance
of being optimized under PyPy except for very rare occasions and even then
it should only be made by those who follow closely and understand PyPy’s
development."


Do others here share this same opinion and should some warning be added to
the jitviewer?

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


More information about the pypy-dev mailing list