[m-rev.] for review: Cache transitive foreign imports.
Peter Wang
novalazy at gmail.com
Fri Nov 25 14:48:16 AEDT 2022
On Fri, 25 Nov 2022 05:08:36 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>
> 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?
Yes, we can cache indirect_imports as well.
>
> > 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.
Fixed, thanks.
Peter
More information about the reviews
mailing list