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

Improve cache hits and JIT friendliness #486

Merged
merged 3 commits into from
Dec 15, 2022
Merged

Improve cache hits and JIT friendliness #486

merged 3 commits into from
Dec 15, 2022

Commits on Dec 15, 2022

  1. Always define instance variables

    This commit makes Addressable::URI more cache friendly.  It changes the
    internals to always define all instance variables, and uses a sentinel
    object in the cases where we need to cache a computation that could
    possibly result in nil.
    tenderlove committed Dec 15, 2022
    Configuration menu
    Copy the full SHA
    fde3e54 View commit details
    Browse the repository at this point in the history
  2. use attr_readers

    tenderlove committed Dec 15, 2022
    Configuration menu
    Copy the full SHA
    ac2d9ed View commit details
    Browse the repository at this point in the history
  3. Remove defined? checks

    `defined?` always returns true for local variables, so there's no need
    to check these
    tenderlove committed Dec 15, 2022
    Configuration menu
    Copy the full SHA
    8eb40a7 View commit details
    Browse the repository at this point in the history