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
[nomerge] fix performance regression in mutable.HashMap#getOrElseUpdate
the change in question originated in
scala/collection-strawman#484. it was correct
at the time because `HashTable#addEntry0` has a threshold check
but then when the change was backported to 2.12.x in
scala/scala#6828, the
`HashTable#addEntry0`call was replaced with a call to
`HashMap#addEntry0`, which doesn't check the threshold. so if the
table is only ever updated using `getOrElseUpdate`, the table's load
factor would just keep climbing, resulting in poor performance
this was caught by my Project Euler solutions :-)
[nomerge] since the problem is specific to the 2.12 code
0 commit comments