diff options
author | Tamar Christina <tamar@zhox.com> | 2017-10-03 14:55:28 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-10-03 16:25:07 -0400 |
commit | 8d647450655713e035091349d5163a1a28be18f4 (patch) | |
tree | 20d8986f1ae456f32682bcf7341913a507226c26 /testsuite/tests/rename/should_compile/T17d.stderr | |
parent | ec9ac20d0964c9f1323105b5a2df24f50d4fe3ef (diff) | |
download | haskell-8d647450655713e035091349d5163a1a28be18f4.tar.gz |
Optimize linker by minimizing calls to tryGCC to avoid fork/exec overhead.
On Windows process creations are fairly expensive. As such calling them in
what's essentially a hot loop is also fairly expensive.
Each time we make a call to `tryGCC` the following fork/exec/wait happen
```
gcc -> realgcc -> cc1
```
This is very problematic, because according to the profiler about 20% of the
time is spent on just process creation and spin time.
The goal of the patch is to mitigate this by asking GCC once for it's search
directories, caching these (because it's very hard to change these at all
after the process started since GCC's base dirs don't change unless with
extra supplied `-B` flags.).
We also do the same for the `findSysDll` function, since this computes
the search path every time by registery accesses etc.
These changes and D3909 drop GHC on Windows startup time from 2-3s to 0.5s.
The remaining issue is a 1.5s wait lock on `CONIN$` which can be addressed
with the new I/O manager code. But this makes GHCi as responsive on Windows as
GHC 7.8 was.
Test Plan: ./validate
Reviewers: austin, hvr, bgamari, erikd
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3910
Diffstat (limited to 'testsuite/tests/rename/should_compile/T17d.stderr')
0 files changed, 0 insertions, 0 deletions