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
Replace the atOwner idiom in Transformers with pushOwner / popOwner. Subclasses can customise these and stack context into ArrayBuffer. This will be allocation free, as opposed to the closures that currently need to be allocated to pass to atOwner.
Avoid the indirection through the bridges implied by api.Transformer to reduce the Java stack depth during transforms (making stack traces easier to read, cheaper to collect in profiles, and maybe more inlinable)
This might also lead to a way for us to have a lighter weight localTyper, without a full Typer/Context combo.
Verify correctness of the patch (partest --pos works so far)
Benchmark the change for compile speed and allocation rate
Look at the stack traces of the transform for user friendliness
The followup idea is the try to tag each Type and Tree subclass with an Int and replace our pattern matches on these with a @switch match.
The text was updated successfully, but these errors were encountered:
In https://github.com/scala/scala/compare/2.13.x...retronym:faster/transformer-faster?expand=1, I demonstrate an idea I've had for a while to try to optimize our compiler "middle end".
atOwner
idiom inTransformers
withpushOwner
/popOwner
. Subclasses can customise these and stack context intoArrayBuffer
. This will be allocation free, as opposed to the closures that currently need to be allocated to pass toatOwner
.api.Transformer
to reduce the Java stack depth during transforms (making stack traces easier to read, cheaper to collect in profiles, and maybe more inlinable)This might also lead to a way for us to have a lighter weight
localTyper
, without a fullTyper/Context
combo.partest --pos
works so far)The followup idea is the try to tag each
Type
andTree
subclass with anInt
and replace our pattern matches on these with a@switch
match.The text was updated successfully, but these errors were encountered: