Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from curl:master #326

Merged
merged 4 commits into from
Feb 19, 2025
Merged

[pull] master from curl:master #326

merged 4 commits into from
Feb 19, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented Feb 19, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

bagder and others added 4 commits February 19, 2025 07:49
Around 2.3x speed-up parsing many large hexadecimal numbers. The decimal and
octal parser get marginally faster.

Still very readable, compact and easy to follow code.

Tweaks

- combine the max and the overflow check, gains 3ns/num (use a separate
  check outside of the loop instead for max < base)
- one less indirection in the pointer, gains 3ns/num
- using the table lookup for hex nums, gains 5ns/num
- unfold the num_digit() macro, gains 3s/num
- use the hexasciitable unconditionally, gains 2ns/num
- use post-increment pointer in the table lookup, gains 1ns/num
- improved valid_digit() using the table for the hex case,
  gains 26 ns/num
- use "max char" in valid_digit(), gains 3ns/num

Behavior changes:

- no longer returns STRE_TOO_BIG - only STRE_OVERFLOW
- does not move the char ** on error, which is probably better

Updated and extended test 1664 (significantly).

Closes #16374
They have always been documented in lowercase. They have never been
claimed to be case insensitive. They mostly map to unix counterparts
that are always lowercase. Switch to case sensitive checks: lowercase.

Closes #16382
@pull pull bot added the ⤵️ pull label Feb 19, 2025
@pull pull bot merged commit 3100fb4 into AraHaan:master Feb 19, 2025
@github-actions github-actions bot added the tests label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants