https://github.com/nh2/ghc-generics-deriving-is-slow
Reproduction for `deriving Generic` being quadratic in the Glorious Haskell Compiler
https://github.com/nh2/ghc-generics-deriving-is-slow
Last synced: 4 months ago
JSON representation
Reproduction for `deriving Generic` being quadratic in the Glorious Haskell Compiler
- Host: GitHub
- URL: https://github.com/nh2/ghc-generics-deriving-is-slow
- Owner: nh2
- Created: 2016-04-27T19:51:56.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-27T19:54:41.000Z (about 9 years ago)
- Last Synced: 2025-01-13T00:26:34.356Z (5 months ago)
- Language: Haskell
- Size: 1.95 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ghc-generics-deriving-is-slow
Reproduction for `deriving Generic` being quadratic in the Glorious Haskell Compiler.
## Running
Run `./run.sh`.
Expected output with GHC 7.10.3:
```
➤ ./run.sh
[1 of 1] Compiling Main ( Data100.hs, Data100.o )
Linking Data100 ...real 0m1.089s
user 0m1.012s
sys 0m0.079s
[1 of 1] Compiling Main ( Data200.hs, Data200.o )
Linking Data200 ...real 0m2.980s
user 0m2.851s
sys 0m0.150s
[1 of 1] Compiling Main ( Data400.hs, Data400.o )
Linking Data400 ...real 0m9.283s
user 0m8.813s
sys 0m0.486s
```The summary for your convenience:
```
100 alternatives 1 second
200 alternatives 3 seconds
400 alternatives 9 seconds
```