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
While analysis profiles of Scalac, I noticed an unexpected allocation hotspot in the Uncurry type map.
Here's a minimization:
caseclassC(x: Any)
classTest {
deftest(a: Any) = a match {
caseC("a") =>caseC(x) => () => x
// Patmat's CSE stores the results of the `asInstanceOf[C]` in a var// under -optimize, it doesn't bind a local for x at the beginning of the case body,// and instead selects temp.x from the closure body. This incurs an `ObjectRef`,// even though the closure only needs read only access.// Workaround: No ObjectRef needed in this case.// case C(x) => val xx = x; () => xx
}
}
The text was updated successfully, but these errors were encountered:
While analysis profiles of Scalac, I noticed an unexpected allocation hotspot in the
Uncurry
type map.Here's a minimization:
The text was updated successfully, but these errors were encountered: