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

src: use an array for faster binding data lookup #46620

Closed
wants to merge 1 commit into from

Commits on Feb 22, 2023

  1. src: use an array for faster binding data lookup

    Locally the hashing of the binding names sometimes has significant
    presence in the profile of bindings, because there can be collisions,
    which makes the cost of adding a new binding data non-trivial,
    but it's wasteful to spend time on hashing them or dealing with
    collisions at all, since we can just use the EmbedderObjectType
    enum as the key, as the string names are not actually used beyond
    debugging purposes and can be easily matched with a macro.
    And since we can just use the enum as the key, we do not even
    need the map and can just use an array with the enum as indices
    for the lookup.
    joyeecheung committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    4becc8f View commit details
    Browse the repository at this point in the history