-
Notifications
You must be signed in to change notification settings - Fork 396
Replace (Par)TrieMap with ConcurrentHashMap in IncOptimizer #4974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice :)
I only have one real comment about the tests.
...red/src/test/scala/org/scalajs/testsuite/javalib/util/concurrent/ConcurrentHashMapTest.scala
Show resolved
Hide resolved
linker/shared/src/main/scala/org/scalajs/linker/frontend/optimizer/IncOptimizer.scala
Outdated
Show resolved
Hide resolved
- Reduces residual retained size of the IncOptimizer on the test suite from 166MB to 144MB. - ~10% batch speedup on the optimizer.
I was having second thoughts about implementing the supposedly parallel WDYT? |
Hum I don't think that's OK. It directly goes against our policy "if it links, it's correct". Does the API guarantee any degree of parallelism? It didn't seem like it does when I looked at it. If it doesn't, always executing serially is correct. |
JavaDoc says:
So yeah, we could argue that if we ever were to implement |
I have removed the last commit again. |
from 166MB to 144MB.