Re: OCaml flambda optimizations causing a compilation slow down

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Richard W. M. Jones:

> On Mon, May 06, 2024 at 10:16:45AM +0200, Florian Weimer wrote:
>> * Richard W. M. Jones:
>> 
>> > This email is mostly to notify that this is happening.  I'm not sure
>> > if a single package slowing down compilation means we need to do
>> > anything here, but if anyone else sees similar symptoms, let us know.
>> 
>> What blocks you from profiling it and fixing the performance issue?
>
> I did profile it down to a couple of functions in a very dark corner
> of the compiler (see the thread on cocci devel list that I posted).
> However in the time available last week I didn't have the time to
> understand what it was doing or fix it.

It's computing a transitive closure of a graph, but in a strange way.

The graph it chokes on has 12,732 vertices and 56,289 edges, and 3,449
vertices are Top.  So it's really not very large, and the original graph
is even quite sparse.

This should fix it:

  flambda: Improve transitive closure in invariant_params_in_recursion
  <https://github.com/ocaml/ocaml/pull/13150>

Compilation is still not exactly fast, but I think it's bearable (less
than 40 seconds over here).

My original comment was a bit of a snark, admittedly.  This one was
slightly more challenging than usual because it takes a while until
invariant_params_in_recursion is reached, so if you hit ^C under GDB to
early, you won't see where it's really spending its time.  But I'm
pretty sure profiling with just 10 samples per second would have
revealed the problematic area just fine.

Thanks,
Florian
--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux