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

fix: optimize Range parsing and formatting #726

Merged
merged 3 commits into from
Jul 16, 2024
Merged

fix: optimize Range parsing and formatting #726

merged 3 commits into from
Jul 16, 2024

Commits on Jul 13, 2024

  1. fix(range): optimize space character normalization

    Produce fewer intermediate objects when a range's space characters are reduced to single spaces.
    
    This appears to have about 5% performance benefit for bench-subset, and smaller but detectable impact on bench-satisfies.
    jviide committed Jul 13, 2024
    Configuration menu
    Copy the full SHA
    f4083bd View commit details
    Browse the repository at this point in the history
  2. fix(range): optimize range formatting

    This speeds bench-subset and bench-satisfies by up to 20%.
    jviide committed Jul 13, 2024
    Configuration menu
    Copy the full SHA
    a9f61b8 View commit details
    Browse the repository at this point in the history
  3. fix(range): compute formatted value lazily

    This speeds bench-subset and bench-satisfies by up to 9%.
    
    The external interface of the Range class is kept as-is except that the .range property is not writable anymore.
    
    format test
    jviide committed Jul 13, 2024
    Configuration menu
    Copy the full SHA
    3f5ec0b View commit details
    Browse the repository at this point in the history