Skip to content

Perf regression in 7.8.2 relative to 7.6.3, possibly related to HashMap

$ git clone http://github.com/facebook/Haxl.git
Cloning into 'Haxl'...
remote: Counting objects: 77, done.
remote: Compressing objects: 100% (65/65), done.
remote: Total 77 (delta 17), reused 69 (delta 9)
Unpacking objects: 100% (77/77), done.
$ cd Haxl 
$ ghc-7.6.3 -O2 tests/Bench.hs -main-is Bench -o tests/Bench-76
[1 of 6] Compiling Haxl.Core.StateStore ( Haxl/Core/StateStore.hs, Haxl/Core/StateStore.o )
[2 of 6] Compiling Haxl.Core.Show1  ( Haxl/Core/Show1.hs, Haxl/Core/Show1.o )
[3 of 6] Compiling Haxl.Core.Util   ( Haxl/Core/Util.hs, Haxl/Core/Util.o )
[4 of 6] Compiling Haxl.Core.Types  ( Haxl/Core/Types.hs, Haxl/Core/Types.o )
[5 of 6] Compiling Haxl.Core.DataCache ( Haxl/Core/DataCache.hs, Haxl/Core/DataCache.o )
[6 of 6] Compiling Bench            ( tests/Bench.hs, tests/Bench.o )
Linking tests/Bench-76 ...
$ ./tests/Bench-76 500000                                      
Just (Right 0)
insert: 0.87s
500000
lookup: 0.24s
$ ./tests/Bench-76 500000
Just (Right 0)
insert: 0.87s
500000
lookup: 0.26s
$ ghc-7.8.2 -O2 tests/Bench.hs -main-is Bench -o tests/Bench-78
[1 of 5] Compiling Haxl.Core.StateStore ( Haxl/Core/StateStore.hs, Haxl/Core/StateStore.o )
[2 of 5] Compiling Haxl.Core.Show1  ( Haxl/Core/Show1.hs, Haxl/Core/Show1.o )
[3 of 5] Compiling Haxl.Core.Types  ( Haxl/Core/Types.hs, Haxl/Core/Types.o )
[4 of 5] Compiling Haxl.Core.DataCache ( Haxl/Core/DataCache.hs, Haxl/Core/DataCache.o )
[5 of 5] Compiling Bench            ( tests/Bench.hs, tests/Bench.o )
Linking tests/Bench-78 ...
$ ./tests/Bench-78 500000                                      
Just (Right 0)
insert: 1.09s
500000
lookup: 0.44s
$ ./tests/Bench-78 500000
Just (Right 0)
insert: 1.08s
500000
lookup: 0.44s
Trac metadata
Trac field Value
Version 7.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information