Wolfgang Jeltsch pushed to branch wip/jeltsch/more-efficient-home-unit-imports-finding at Glasgow Haskell Compiler / GHC
Commits:
-
482135cc
by Wolfgang Jeltsch at 2026-05-12T21:16:35+03:00
1 changed file:
Changes:
| 1 | +section: compiler
|
|
| 2 | +synopsis: Introduce a cache of home module name providers
|
|
| 3 | +issues: #27055
|
|
| 4 | +mrs: !15888
|
|
| 5 | +description: {
|
|
| 6 | + This contribution optimizes the algorithm for finding out which home
|
|
| 7 | + unit provides the module that a certain import declaration refers
|
|
| 8 | + to. The previous approach has been to simply search all home units
|
|
| 9 | + in no particular order. This change introduces a cache that allows
|
|
| 10 | + for efficiently determining those complete home units that provide a
|
|
| 11 | + certain module name and changes the module-finding algorithm such
|
|
| 12 | + that it searches these units before the other home units. This leads
|
|
| 13 | + to significant performance improvements in situations where there
|
|
| 14 | + are lots of home units.
|
|
| 15 | +} |