This repository has been archived by the owner on Nov 29, 2020. It is now read-only.
Instance instantiation in the outermost scope #38
Labels
enhancement
New feature or request
good first issue
Good for newcomers
optimization
Code optimization opportunity.
For future docs:
Instance instantiation in the outermost scope
Consider the following snippet:
The body of the loop will compile to:
So there are two allocations per comparison, one allocation of the syntax extension class and one for the instance of
Eq[List[A]]
. This optimization should fix the latter by instantiating the instance in the outermost static scope,or at the beginning of the function:
Requirements
The text was updated successfully, but these errors were encountered: