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

Use Symbol even more #60815

Merged
merged 3 commits into from
May 20, 2019
Merged

Use Symbol even more #60815

merged 3 commits into from
May 20, 2019

Commits on May 19, 2019

  1. Avoid as_str() in ParamTy::is_self.

    It's a hot function, and a direct `Symbol` comparison is faster.
    
    The patch also converts some `&InternedString`s to `InternedString`.
    nnethercote committed May 19, 2019
    Configuration menu
    Copy the full SHA
    b96be5b View commit details
    Browse the repository at this point in the history
  2. Introduce InternedString::intern.

    `InternedString::intern(x)` is preferable to
    `Symbol::intern(x).as_interned_str()`, because the former involves one
    call to `with_interner` while the latter involves two.
    
    The case within InternedString::decode() is particularly hot, and this
    change reduces the number of `with_interner` calls by up to 13%.
    nnethercote committed May 19, 2019
    Configuration menu
    Copy the full SHA
    257eaf5 View commit details
    Browse the repository at this point in the history
  3. Introduce LocalInternedString::intern.

    `LocalInternedString::intern(x)` is preferable to
    `Symbol::intern(x).as_str()`, because the former involves one call to
    `with_interner` while the latter involves two.
    nnethercote committed May 19, 2019
    Configuration menu
    Copy the full SHA
    c06cdbe View commit details
    Browse the repository at this point in the history