<br><br><div class="gmail_quote">On Sun, Sep 25, 2011 at 1:49 PM, Bob Ippolito <span dir="ltr"><<a href="mailto:bob@redivi.com">bob@redivi.com</a>></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'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't regress performance for some<br>
people). The other things I'm missing are a good suite of documents to<br>
benchmark with, and a good tool to run the benchmarks so it'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'Whielacronx <<a href="mailto:zooko@zooko.com">zooko@zooko.com</a>> wrote:<br>
> But don't people who need better json performance use simplejson<br>
> explicitly instead of using the standard library's json?<br>
><br>
> Regards,<br>
><br>
> Zooko<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>
><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'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'd like to get the code input[i:i+4] == "NULL" to eventually generate:<div>
<br></div><div>read str length</div><div>check length >= 4</div><div>read 4 bytes out of input (single MOVL)</div><div>integer compare to ('N' << 0) | ('U' << 8) | ('L' << 16) | ('L' << 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>"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>
"The people's good is the highest law." -- Cicero<br><br>
</div>