<div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0)">> Let me rephrase it. Where did you look for such a warning and you did
> not find it so you assumed it's ok?

> Cheers,
> fijal</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Having a warning on <a href="https://bitbucket.org/pypy/jitviewer">https://bitbucket.org/pypy/jitviewer</a> would be good.</pre></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sun, Feb 3, 2013 at 3:08 PM, John Camara <span dir="ltr"><<a href="mailto:john.m.camara@gmail.com" target="_blank">john.m.camara@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><pre style="white-space:pre-wrap">> What makes you think people will even read this warning, let alone 
> prioritize it over their immediate desire to make their program run 
> faster?
<pre style="white-space:pre-wrap">> (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)</pre>
> Jean-Paul</pre><pre style="white-space:pre-wrap">I agree with you and was not being naive and thinking this alone was going to solve the problem but it does gives us something to point to when we see someone abusing the jitviewer.</pre>

<pre><font color="#000000"><span style="white-space:pre-wrap">Maybe, a more effective approach, is not to advertise about the jitviewer to everyone who has performance issues and only tell those who are experience programmers who have already done the obvious in fixing any design issues that had existed in their code.  Having inexperience developers use the normal profiling tools will still help them find the hot spots in their code and help prevent them from picking up habits that lead them to writing un-Pythonic code. </span></font></pre>

<pre><font color="#000000"><span style="white-space:pre-wrap">I'm sure we all agree that code with a better design will run faster in pypy than trying to add optimizations that work only for pypy to help out a poor design.</span></font></pre>

<pre><font color="#000000"><span style="white-space:pre-wrap">I don't think we want to end up with a lot of Python code that looks like C code.  This is what happens when the inexperience start relying on the jitviewer.</span></font></pre>

<pre><font color="#000000"><span style="white-space:pre-wrap">For instance take a look at this code [1] and blog [2] which lead me to post this. </span></font>This is not the first example I have come across this issue and unfortunately it appears to be increaseing at an alarming rate.</pre>

<pre>I guess I feel we have a responsibility to try to promote good programming practices when we can.</pre><pre><font color="#000000"><span style="white-space:pre-wrap">[1] - </span></font><a href="https://github.com/msgpack/msgpack-python/blob/master/msgpack/fallback.py" target="_blank">https://github.com/msgpack/msgpack-python/blob/master/msgpack/fallback.py</a></pre>

<pre><font color="#000000"><span style="white-space:pre-wrap">[2] - </span></font><a href="http://blog.affien.com/archives/2013/01/29/msgpack-for-pypy/" target="_blank">http://blog.affien.com/archives/2013/01/29/msgpack-for-pypy/</a></pre>
<span class="HOEnZb"><font color="#888888">
<pre><span style="white-space:pre-wrap">John</span><br></pre></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Feb 3, 2013 at 12:39 PM, John Camara <span dir="ltr"><<a href="mailto:john.m.camara@gmail.com" target="_blank">john.m.camara@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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.</div>


<div><br></div><div>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.</div>


<div><br></div><div>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.<br></div><div><br>
</div><div>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</div>
<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>"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."</div>


</blockquote><div><br></div><div>Do others here share this same opinion and should some warning be added to the jitviewer?</div><span><font color="#888888"><div><br></div><div>John<br></div></font></span></div>

</blockquote></div><br></div>
</div></div></blockquote></div><br></div>