8 votes

Topic deleted by author

2 comments

  1. [2]
    petrichor
    Link
    If anyone is interested, an old fasterthanlime article on tracing slow compilation times in Rust (because of a bug) has a nice visual of time spent by the Rust compiler (on a regular build,...

    If anyone is interested, an old fasterthanlime article on tracing slow compilation times in Rust (because of a bug) has a nice visual of time spent by the Rust compiler (on a regular build, without the bug).

    That monomorphization takes Just So Long is interesting to me. I didn't and still don't understand why that's such a huge performance suck: maybe I will in the future as I learn more about compilers (and Rust).

    3 votes
    1. archevel
      (edited )
      Link Parent
      This recent post talks a bit about monomorphization in relation to go generics, which did/does not use that approach. IIUC the compiler essentially generates the non type parameterized versions of...

      This recent post talks a bit about monomorphization in relation to go generics, which did/does not use that approach. IIUC the compiler essentially generates the non type parameterized versions of the code for all things using the generic code. I can imagine that some housekeeping needs to be done if you'd e.g. need to compile a library that exposes a generic interface.

      It does however seem rather straight forward to generate the code when compiling an executable, but I assume there's likely some corner cases that can create a (limited) combinatorial explosion

      2 votes