uJSON, PyPy, Crossbar 10.4 Issues

#1

Please see this blog post:
http://www.pynut.com/?p=90

Can anyone point me in the right direction getting ujson to install with pypy so crossbar can use it as a JSON codec?

#2

no clue, but ujson on PyPy will be slower than json from stdlib, which is the reason that Crossbar.io does not install it as a dependency:

https://github.com/crossbario/crossbar/blob/master/setup.py#L100
https://github.com/tavendo/AutobahnPython/blob/master/setup.py#L115

···

Am 16.04.2015 um 00:06 schrieb Dave Thomas:

Please see this blog post:
http://www.pynut.com/?p=90

Can anyone point me in the right direction getting ujson to install with
pypy so crossbar can use it as a JSON codec?

#3

Thank you Tobias!

···

On Apr 15, 2015 7:44 PM, “Tobias Oberstein” tobias.o...@gmail.com wrote:

Am 16.04.2015 um 00:06 schrieb Dave Thomas:

Please see this blog post:

http://www.pynut.com/?p=90

Can anyone point me in the right direction getting ujson to install with

pypy so crossbar can use it as a JSON codec?

no clue, but ujson on PyPy will be slower than json from stdlib, which is the reason that Crossbar.io does not install it as a dependency:

https://github.com/crossbario/crossbar/blob/master/setup.py#L100

https://github.com/tavendo/AutobahnPython/blob/master/setup.py#L115

You received this message because you are subscribed to a topic in the Google Groups “Crossbar” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/crossbario/vg0GjQ20tok/unsubscribe.

To unsubscribe from this group and all its topics, send an email to crossbario+unsubscribe@googlegroups.com.

To post to this group, send email to cross...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/552EF7DC.6020705%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

#4

Just to add a little context as I was working on something related, using a simple JSON benchmark with ujson vs json, this is sort of what it looks like;

                      ujson            json   
Python3               0.1422           0.5650
Pypy3                 2.8283           0.2612

So on the one hand, if you “know” you’re going to be using cPython then ujson will give you much better results, if you might be using pypy, the performance hit of committing to ujson is pretty devastating. I’m just wondering if there’s a nice clean way of doing “if cpy import ujson, else import json” …