Code generated by GHC 8.2.1 faster than 8.0.1 but still somewhat slower than 7.10.3
Unicode normalization library (https://github.com/harendra-kumar/unicode-transforms) shows around 10% improvement with GHC 8.2.1 when compared to GHC 8.0.1, across most benchmarks. However, it is still somewhat slower when compared to GHC 7.10.3. On the other hand, when compared to GHC 7.8.4, GHC 8.2.1 is marginally better.
This library has been optimized with an objective to match or better (in some cases it is better) the performance of the equivalent ICU C++ library (compare only decompose normalization). Some of the last hurdles to match the best case of C++ were in the code generated by GHC. I filed a couple of ghc trac tickets earlier on that.
You can reproduce these results easily as follows:
$ git clone https://github.com/harendra-kumar/unicode-transforms.git
$ git checkout -b v0.3.3 v0.3.3
$ echo ghc-8.0
$ stack bench
$ stack bench --stack-yaml stack-7.10.yaml
$ stack bench --stack-yaml stack-8.2.yaml
Here are some excerpts from the benchmarks:
GHC 7.10.3:
benchmarking unicode-transforms-text/NFD/English
time 4.823 ms (4.765 ms .. 4.902 ms)
benchmarking unicode-transforms-text/NFD/Deutsch
time 5.607 ms (5.522 ms .. 5.673 ms)
GHC 8.0.1
benchmarking unicode-transforms-text/NFD/English
time 6.330 ms (6.232 ms .. 6.439 ms)
benchmarking unicode-transforms-text/NFD/Deutsch
time 7.109 ms (7.034 ms .. 7.183 ms)
GHC 8.2.1
benchmarking unicode-transforms-text/NFD/English
time 5.659 ms (5.594 ms .. 5.740 ms)
benchmarking unicode-transforms-text/NFD/Deutsch
time 6.406 ms (6.329 ms .. 6.478 ms)
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |