On 05:39 pm, john.m.cam...@gmail.com wrote:
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?
What makes you think people will even read this warning, let alone
prioritize it over their immediate desire to make their program run
faster?
(Not that I am objecting to adding the warning, but I think you might be
fooling yourself if you think it will have any impact)
Jean-Paul
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev