
#14980: Runtime performance regression with binary operations on vectors -------------------------------------+------------------------------------- Reporter: ttylec | Owner: bgamari Type: bug | Status: new Priority: high | Milestone: 8.8.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: vector | bitwise operations Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tdammers): Hmm, I spent all day trying to reproduce this, but I'm getting exactly the results you'd want. I built the package with cabal, once using ghc 8.0.2, and once using 8.2.2 (both installed from linux-x86_64 release bundles downloaded directly from haskell.org), and I get the same behavior across both compilers, with performance metrics similar to what you're seeing in the 8.0.2 case. Output from `performance-bug-pair1`, compiled with GHC 8.2.2: {{{ tobias@zoidberg:~/well-typed/devel/ghc-T14980/ghc-bug/ > performance-bug- pair-1 "Generated" benchmarking 256 columns/raw unbox vectors time 478.6 μs (477.8 μs .. 479.9 μs) 1.000 R² (1.000 R² .. 1.000 R²) mean 476.4 μs (476.0 μs .. 477.0 μs) std dev 1.501 μs (1.076 μs .. 2.501 μs) benchmarking 256 columns/binary packed time 275.2 μs (271.7 μs .. 278.6 μs) 0.999 R² (0.998 R² .. 1.000 R²) mean 280.2 μs (276.6 μs .. 283.2 μs) std dev 6.706 μs (5.090 μs .. 9.040 μs) variance introduced by outliers: 13% (moderately inflated) }}} And with 8.0.2: {{{ "Generated" benchmarking 256 columns/raw unbox vectors time 476.9 μs (474.4 μs .. 480.5 μs) 1.000 R² (1.000 R² .. 1.000 R²) mean 473.5 μs (472.5 μs .. 475.1 μs) std dev 4.097 μs (2.212 μs .. 7.591 μs) benchmarking 256 columns/binary packed time 291.3 μs (286.8 μs .. 295.4 μs) 0.999 R² (0.998 R² .. 1.000 R²) mean 297.4 μs (293.6 μs .. 300.1 μs) std dev 6.918 μs (4.971 μs .. 9.873 μs) variance introduced by outliers: 12% (moderately inflated) }}} So there must be something about my setup that makes the bug disappear. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14980#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler