Don't count negative sign towards the integer digit limit - #260
Don't count negative sign towards the integer digit limit#260lolopinto wants to merge 5 commits into
Conversation
Negative JSON integers with exactly 4300 digits were rejected because the leading minus sign wasn't being counted towards the integer digit limit. This changes it so that we count the digits independent of the sign and adds tests. ``` jiter.from_json(b"-" + b"9" * 4300) ``` This now parses successfully.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Merging this PR will degrade performance by 14.36%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | massive_ints_array_jiter_iter |
564.1 µs | 688.5 µs | -18.06% |
| ❌ | massive_ints_array_jiter_value |
743 µs | 849.4 µs | -12.54% |
| ❌ | python_parse_massive_ints_array |
1.1 ms | 1.3 ms | -12.37% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing lolopinto:negative-integer-boundary (edc3e7b) with main (785cf75)
|
@codspeedbot fix this regression |
|
I pointed an agent at this and it made some changes and it thinks the rest is because we don't have an apples to apples comparison |
|
looks like this damaged performance. |
|
Looks like the regression is down to this:
The benchmark only contains positive integers, and testing with identical dependencies shows no meaningful performance regression from the PR itself. Can we redo a base? or pin to 0.4.6? |
Negative JSON integers with exactly 4300 digits were rejected because the leading minus sign wasn't being counted towards the integer digit limit.
This changes it so that we count the digits independent of the sign and adds tests.
This now parses successfully.