Anton Korobeynikov

Results 791 comments of Anton Korobeynikov

@vlstill @fruffy @ChrisDodd So, I tried to create PCH for IR headers (excluding `ir-inline.h`). The times do look promising. For `midend/removeComplexExpressions.cpp`: W/o PCH: ``` Executed in 4.12 secs fish external...

And the differences for `ninja frontend` are (compilation is done in 10 threads): ``` Executed in 91.60 secs fish external usr time 550.26 secs 0.06 millis 550.26 secs sys time...

Here is full compilation after .def change (w/o Tofino of course): w/o PCH: ``` Executed in 317.24 secs fish external usr time 39.13 mins 0.10 millis 39.13 mins sys time...

One important thing: if one is switching between the branches frequently and rely on ccache, then the overall compile time might increase as PCH is effectively forces re-compilation in such...

> [](https://clang.llvm.org/extra/clang-tidy/checks/performance/avoid-endl.html) > > The only question is whether we can guarantee that we do end up flushing correctly? Streams force flush on closure, so this should not be a...

> Since `endl` is supposed to flush (by analogy with `std::endl`, making it not flush would be problematic. Perhaps add `IndentCtl::nl` to output a newline without flushing? Glad you suggested...

And it turned out to be a bit tricky. The reason is that GC does not execute destructors for objects. As a result, the streams are never closed. And therefore...

The usual suspect: ``` Allocated a total of 2.7GB memory allocated 737MB in 5576175 calls from: 4 p4c 0x0000000102ff5234 _ZNK2P411Definitions15joinDefinitionsEPKS0_ + 440 0x102ff5234 ... ```

Thanks @jafingerhut, this is great small example. We're having (at first use-def invocation): ``` heap after RemoveUnused: in use 45MB, max 55MB ProcessDefUse invoking P4::ComputeWriteSet heap after P4::ComputeWriteSet: in use...