diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-04-27 17:45:56 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-04-27 17:45:56 +0100 |
commit | a365a58eade7cb2c961af8e60c20b7d78b1b7484 (patch) | |
tree | 1c70949fad3d34e23e4cdba0ed9db9aedef4bf35 | |
parent | 95fb4b1da70a9df50a42449b19ff6350181a38db (diff) | |
download | haskell-a365a58eade7cb2c961af8e60c20b7d78b1b7484.tar.gz |
Make more primops cheaper
This puts back the earlier behaviour (pre "aggressive-primop" patch)
whereby most primpos were considered cheap. In the aggressive-primop
patch we made them ones with bigger "code_size" seem not-cheap, but
this slows down fft2 a lot. So I've reverted to the earlier behaviour.
+++ b/compiler/prelude/PrimOp.lhs
@@ -450,6 +450,8 @@ primOpIsCheap op
-- This is vital; see Note [PrimOp can_fail and has_side_effects]
&& not (primOpOutOfLine op)
- -- && primOpCodeSize op <= primOpCodeSizeDefault
+-- Omitting; it makes fft2 run a lot slower by preventing
+-- eta expansion in an inner loop, with a primop cosDouble#
-rw-r--r-- | compiler/prelude/PrimOp.lhs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/prelude/PrimOp.lhs b/compiler/prelude/PrimOp.lhs index 50803fb2a2..02b6f0b7d6 100644 --- a/compiler/prelude/PrimOp.lhs +++ b/compiler/prelude/PrimOp.lhs @@ -450,6 +450,8 @@ primOpIsCheap op -- This is vital; see Note [PrimOp can_fail and has_side_effects] && not (primOpOutOfLine op) -- && primOpCodeSize op <= primOpCodeSizeDefault +-- Omitting; it makes fft2 run a lot slower by preventing +-- eta expansion in an inner loop, with a primop cosDouble# -- The latter two conditions are a HACK; we should -- really have a proper property on primops that says -- when they are cheap to execute. For now we are using |