Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize AliasAnalysis hotspot (#8701)
`scopeFor` is a real hotspot that hasn't been particularly optimized. By using iterator and a simple variable instead of a list and checking its length I was able to get 10% speedup. Note that it seems tempting to throw the exception within the loop but that seems to create a less optimized code. # Important Notes I'm consistently getting ~10% speedup on a hello world example (with standard libraries). For example I'm no longer seeing 20ms spent in `scopeFor` and most of them are below 10ms: ![Screenshot from 2024-01-08 12-15-30](https://github.com/enso-org/enso/assets/292128/033ece07-eb15-45b5-971f-417bf9f17ef7) Before ![Screenshot from 2024-01-08 12-17-32](https://github.com/enso-org/enso/assets/292128/3848d7c2-0fe8-4951-b222-c8f40d2daf01) After ![Screenshot from 2024-01-08 12-17-09](https://github.com/enso-org/enso/assets/292128/524496f5-3cf0-47f4-8b05-edd330080b14)
- Loading branch information