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

Put common aliases in Map/Set instead of switch over strings #26551

Merged
merged 5 commits into from
Apr 4, 2023

Commits on Apr 4, 2023

  1. Move simple aliases to Map/Set instead of switch statements for perfo…

    …rmance
    
    Unfortunately VMs don't optimize this well enough yet.
    
    Most special cases are still in the switch but now there are few enough
    cases that it's not bad.
    sebmarkbage committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    7022eec View commit details
    Browse the repository at this point in the history
  2. Move very common prop names to the beginning of the switch

    This ensures that when the look up is not optimized, we hit them early in
    the if sequence. We might actually consider moving these to separate ifs
    to ensure that even when the switch is optimized to a hash table, these
    remain as ifs.
    sebmarkbage committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    207c626 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9c208e3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9afe183 View commit details
    Browse the repository at this point in the history
  5. Fix typo

    Co-authored-by: Sophie Alpert <git@sophiebits.com>
    sebmarkbage and sophiebits committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    f9665d5 View commit details
    Browse the repository at this point in the history