<br><br><div class="gmail_quote">On Sun, Sep 25, 2011 at 1:49 PM, Bob Ippolito <span dir="ltr">&lt;<a href="mailto:bob@redivi.com">bob@redivi.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
simplejson would be a good target for changes that would not be easy<br>
to implement on top of the stdlib json. I&#39;d be happy to accept any<br>
contributions. I failed to make big differences in performance when I<br>
tried at PyCon (at least that didn&#39;t regress performance for some<br>
people). The other things I&#39;m missing are a good suite of documents to<br>
benchmark with, and a good tool to run the benchmarks so it&#39;s easy to<br>
see if incremental changes are better or worse.<br>
<br>
However, if RPython is required to make it faster, maybe implementing<br>
_json for the stdlib would actually be best.<br>
<div><div></div><div class="h5"><br>
On Sun, Sep 25, 2011 at 10:30 AM, Zooko O&#39;Whielacronx &lt;<a href="mailto:zooko@zooko.com">zooko@zooko.com</a>&gt; wrote:<br>
&gt; But don&#39;t people who need better json performance use simplejson<br>
&gt; explicitly instead of using the standard library&#39;s json?<br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt; Zooko<br>
&gt; _______________________________________________<br>
&gt; pypy-dev mailing list<br>
&gt; <a href="mailto:pypy-dev@python.org">pypy-dev@python.org</a><br>
&gt; <a href="http://mail.python.org/mailman/listinfo/pypy-dev" target="_blank">http://mail.python.org/mailman/listinfo/pypy-dev</a><br>
&gt;<br>
_______________________________________________<br>
pypy-dev mailing list<br>
<a href="mailto:pypy-dev@python.org">pypy-dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/pypy-dev" target="_blank">http://mail.python.org/mailman/listinfo/pypy-dev</a><br>
</div></div></blockquote></div><br>For what it&#39;s worth, I think we can get there, without needing to write any RPython, through a combination of careful Python, and more JIT optimizations.  For example, I&#39;d like to get the code input[i:i+4] == &quot;NULL&quot; to eventually generate:<div>
<br></div><div>read str length</div><div>check length &gt;= 4</div><div>read 4 bytes out of input (single MOVL)</div><div>integer compare to (&#39;N&#39; &lt;&lt; 0) | (&#39;U&#39; &lt;&lt; 8) | (&#39;L&#39; &lt;&lt; 16) | (&#39;L&#39; &lt;&lt; 24)</div>
<div><br></div><div>in total about 7 x86 instructions.  I think this is definitely possible!</div><div><br></div><div>Alex<br clear="all"><div><br></div>-- <br>&quot;I disapprove of what you say, but I will defend to the death your right to say it.&quot; -- Evelyn Beatrice Hall (summarizing Voltaire)<br>
&quot;The people&#39;s good is the highest law.&quot; -- Cicero<br><br>
</div>