Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runs much slower on GHC-9.6 #78

Closed
leonschoorl opened this issue Oct 18, 2023 · 4 comments
Closed

Runs much slower on GHC-9.6 #78

leonschoorl opened this issue Oct 18, 2023 · 4 comments
Labels
bug Something isn't working upstream Affected by upstream bug

Comments

@leonschoorl
Copy link
Contributor

With GHC-9.6.2 doctest-parallel to runs much slower then before :(

$ time cabal run -w ghc-9.6.2 -- clash-prelude:doctests
[...]
real	1m9,515s
user	1m42,364s
sys	0m8,968s

time cabal run -w ghc-9.4.5 -- clash-prelude:doctests
[...]
real	0m25,501s
user	0m57,237s
sys	0m6,458s

The slowdown seems to be mostly in the example discovery phase.
With 9.6 after starting the program there is a long pause, then it prints any warnings found in the source code, and then it starts testing all the examples.
This pause with no output is ~45s using 9.6.2, and only ~6s using 9.4.5.

@leonschoorl
Copy link
Contributor Author

Some more data

GHC 8.10.7 9.0.2 9.4.5 9.6.2
real 0m16,230s 0m12,355s 0m25,501s 1m9,515s
user 1m10,319s 0m56,553s 0m57,237s 1m42,364s
sys 0m6,790s 0m5,586s 0m6,458s 0m8,968s

There is also a ~2x slowdown between 9.0 and 9.4

@christiaanb
Copy link

Is the executable statically or dynamically linked? If the former, does linking it dynamically instead make it faster?

@martijnbastiaan
Copy link
Owner

martijnbastiaan commented Apr 15, 2024

It seems to have been fixed again in 9.6.3. I'll publish some numbers soonish.

Edit: Maybe https://gitlab.haskell.org/ghc/ghc/-/issues/23464

@martijnbastiaan
Copy link
Owner

GHC Version Error Time
9.0.2 0 5.11
9.2.8 0 3.66
9.4.1 0 3.42
9.4.2 0 3.34
9.4.3 0 3.41
9.4.4 0 3.89
9.4.5 0 3.42
9.4.6 0 3.34
9.4.7 0 4.14
9.4.8 0 55.65
9.6.1 0 60.06
9.6.2 0 56.42
9.6.3 0 6.37
9.6.4 0 7.74

So it broke 9.4.7 → 9.4.8 and was fixed 9.6.2 → 9.6.3.

@martijnbastiaan martijnbastiaan added upstream Affected by upstream bug bug Something isn't working labels Apr 15, 2024
@martijnbastiaan martijnbastiaan closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Affected by upstream bug
Projects
None yet
Development

No branches or pull requests

3 participants