You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler is now able to inline calls to static and instance methods.
For each method we calculate a rough weight/cost, and calls are inlined
into their callers until the maximum weight is reached. Inlining is done
bottom-up using Tarjan's strongly connected components algorithm,
reducing the amount of duplicate inlining work. Inlining is also done in
a deterministic order as to ensure incremental compilation caches can be
reused as much as possible.
The current inlining threshold is on the conservative end as to not
increase compile times and compile-time memory usage too much. Over time
we may relax this based on user reports and any extra optimization
passes we might add.
If a method is annotated with the `inline` keyword, it's _always_
inlined into the caller regardless of it or the caller's weight. This is
meant to be used when you want to guarantee a method is inlined, such as
for the various operator methods of Int, Float, Bool, etc. Because of
this guarantee one should use it sparingly, as to not increase the
compile time and executable size too much.
This fixes#343.
Changelog: added
0 commit comments