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

Optimizations in tail calls #3448

Merged
merged 3 commits into from
Feb 2, 2014
Merged

Commits on Jan 31, 2014

  1. Configuration menu
    Copy the full SHA
    eb2627c View commit details
    Browse the repository at this point in the history
  2. Optimize tailcall elimination

    From the "if a tree falls" department: don't bother create a finely
    distinguished error messages about why the transform is inapplicable
    if the current context doesn't demand it.
    retronym committed Jan 31, 2014
    Configuration menu
    Copy the full SHA
    67f7df2 View commit details
    Browse the repository at this point in the history
  3. Optimization in TailCalls

    Only store the position and reason for a failure to tailcall
    transform a method if we ever need to report it, ie, if the
    method was annotated with @tailrec.
    
    Saves object hashing and map updates, profiling suggests
    that this reduces the tailcalls phase from about 2% of compilation
    time to about 1%.
    
    Also, clear the maps eagerly after each compilation unit,
    rather than letting them accumulate entries for the entire
    run. Working with smaller maps can't hurt.
    retronym committed Jan 31, 2014
    Configuration menu
    Copy the full SHA
    c30cf0e View commit details
    Browse the repository at this point in the history