Skip to content

Implement issue #42: use upstream RapidJSON v1.1#46

Merged
kenrobbins merged 11 commits into
python-rapidjson:masterfrom
lelit:rj-v1.1-as-submodule-v2
Dec 8, 2016
Merged

Implement issue #42: use upstream RapidJSON v1.1#46
kenrobbins merged 11 commits into
python-rapidjson:masterfrom
lelit:rj-v1.1-as-submodule-v2

Conversation

@lelit

@lelit lelit commented Aug 31, 2016

Copy link
Copy Markdown
Contributor

This adapts the module to use upstream RapidJSON v1.1, using a submodule referencing the official tag.

Upon first checkout (or after the merge), you should execute a git submodule update --init. Alternatively you can use git clone --recursive to do the checkout and the submodule initialization in a single step.

lelit added 11 commits August 31, 2016 13:16
This allows loading the (virtually) unlimited range of Python's integers
and floats (when using the Decimal data type). Since the conversion from
the textual representation to the numeric is now entirely done by the
Python runtime, the flag precise_float does not makes sense anymore and
it's been removed.
Use the same grouping rule both when comparing with other engines or
not.
@lelit

lelit commented Sep 1, 2016

Copy link
Copy Markdown
Contributor Author

FYI, I'm leaving for a week of vacation, so I won't be reachable until sept 11...

@lelit

lelit commented Sep 13, 2016

Copy link
Copy Markdown
Contributor Author

In lelit/python-rapidjson@fa63d17 I added a native_numbers option to dumps() and loads() to force use of the underlying C library arithmetic, somewhat faster, in particular for the latter function:

--------------------------------------------------------------------------- benchmark '512 numbers array: deserialize': 2 tests ----------------------------------------------------------------------------
Name (time in us)                                             Min                 Max                Mean            StdDev              Median               IQR            Outliers(*)  Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_loads_numbers[Native numbers-512 numbers array]      30.2480 (1.0)       60.2280 (1.0)       30.7363 (1.0)      0.7514 (1.0)       30.6820 (1.0)      0.1680 (1.0)          400;902   25039           1
test_loads_numbers[Wide numbers-512 numbers array]       113.2490 (3.74)     177.5800 (2.95)     114.2523 (3.72)     2.3087 (3.07)     113.9890 (3.72)     0.2550 (1.52)         209;440    7326           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------- benchmark '512 numbers array: serialize': 2 tests ---------------------------------------------------------------------------
Name (time in us)                                            Min                 Max               Mean            StdDev             Median               IQR            Outliers(*)  Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_dumps_numbers[Native numbers-512 numbers array]     50.6330 (1.0)      115.7490 (1.06)     51.5841 (1.0)      1.8838 (1.56)     51.3230 (1.0)      0.2320 (1.10)        330;1624   16585           1
test_dumps_numbers[Wide numbers-512 numbers array]       66.5600 (1.31)     109.6080 (1.0)      67.2445 (1.30)     1.2087 (1.0)      67.1300 (1.31)     0.2100 (1.0)          255;618   12171           1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Let me know if it seems ok to merge that here (in particular wrt the option name).

@lelit

lelit commented Sep 27, 2016

Copy link
Copy Markdown
Contributor Author

@kenrobbins: is there anything left I can/should do to promote this PR into your master branch?

@kenrobbins kenrobbins merged commit 5405613 into python-rapidjson:master Dec 8, 2016
@lelit lelit mentioned this pull request Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants