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

Avoid unwinding the stack on hot path in method call lookups #15002

Merged

Commits on Sep 14, 2024

  1. Avoid unwinding the stack on hot path in method call lookups

    The method lookup code uses exceptions to retry lookups using
    auto-casting. This is effectively using an exception for execution
    control, which is not what they are intended for. On `raise`, Crystal
    will try to unwind the call stack and save it to be able to report the
    original place where the exception was thrown, and this is a very
    expensive operation. To avoid that, we initialize the callstack of the
    special `RetryLookupWithLiterals` exception class always with the same
    fixed value.
    ggiraldez committed Sep 14, 2024
    Configuration menu
    Copy the full SHA
    187f2cb View commit details
    Browse the repository at this point in the history