[m-rev.] for review: Cache transitive foreign imports.
Zoltan Somogyi
zoltan.somogyi at runbox.com
Fri Nov 25 05:08:36 AEDT 2022
2022-11-24 14:45 GMT+11:00 "Peter Wang" <novalazy at gmail.com>:
> We previously cached the foreign imports of a module.
> find_module_foreign_imports always needs to compute the transitive
> foreign imports (i.e. including the foreign imports of transitively
> implementation-imported modules), so it had to take the union of a bunch
> of sets after looking up cached results.
>
> This change caches the transitive foreign imports of a module, avoiding
> the bitset union operations, many/most of which turn out to be redundant.
> It reduces the average run time for a do-nothing build of Prince on my
> machine from 5.9 s to 3.1 s, for a speed up of ~47%.
That's great. Did you profile it to see whether there are any
obvious remaining bottlenecks?
> compiler/make.dependencies.m:
> Cache transitive foreign module imports instead of direct foreign
> module imports.
>
> Delete code to make use va_map; it is no longer used.
Some word is missing there.
The diff itself is fine.
Zoltan.
More information about the reviews
mailing list