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

Parsing optimisations #776

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Commits on Aug 10, 2023

  1. Parse least common datatype last

    Null types are almost certainly the least common object, so putting the
    check last in the list will be faster.
    
    This gave an approximate 5% performance improvement in parse_value() in
    tests.
    ralight committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    bb27ffa View commit details
    Browse the repository at this point in the history
  2. Optimise string parsing when there are no escape characters

    This resulted in approximately 40% reduction in instructions used in
    parse_string() when parsing a 4MB JSON file, as measured in callgrind.
    ralight committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    e64b984 View commit details
    Browse the repository at this point in the history
  3. Optimise while loop checks in parse_string

    This gave an approximate 4% improvement in tests.
    ralight committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    9735349 View commit details
    Browse the repository at this point in the history