1
0
mirror of https://github.com/ultrajson/ultrajson.git synced 2024-11-23 20:53:30 +01:00
ultrajson/python
INADA Naoki af1b05d74e Zero cost utf-8 encode for PyASCIIObject.
Before:
$ python3.4 -m timeit -n 10000 -s 'import ujson; x = ["a"*10]*100' 'ujson.dumps(x)'
10000 loops, best of 3: 15.8 usec per loop

After:
$ python -m timeit -n 10000 -s 'import ujson; x = ["a"*10]*100' 'ujson.dumps(x)'
10000 loops, best of 3: 7.14 usec per loop

Other unicode objects creates utf-8 cache in PyUnicode_AsUTF8AndSize().
It consume extra memory.
2014-12-26 01:54:45 +09:00
..
JSONtoObj.c support promotion of numeric values to unsigned long 2014-09-02 17:00:16 -04:00
objToJSON.c Zero cost utf-8 encode for PyASCIIObject. 2014-12-26 01:54:45 +09:00
py_defines.h Updated copyright clause 2014-04-14 13:45:50 +02:00
ujson.c Updated copyright clause 2014-04-14 13:45:50 +02:00
version.h Updated copyright clause 2014-04-14 13:45:50 +02:00