diff options
author | Simon Marlow <marlowsd@gmail.com> | 2008-11-06 11:36:39 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2008-11-06 11:36:39 +0000 |
commit | 2b16fa4791b08b02df8461f3b79d0e44d72d0960 (patch) | |
tree | 53d0bba9254703d7d569e91c0f0f7b19ba8f25f8 /compiler/prelude/primops.txt.pp | |
parent | ebfa6fde6d9797ad2434a2af73a4c85b2984e00a (diff) | |
download | haskell-2b16fa4791b08b02df8461f3b79d0e44d72d0960.tar.gz |
Run sparks in batches, instead of creating a new thread for each one
Signficantly reduces the overhead for par, which means that we can
make use of paralellism at a much finer granularity.
Diffstat (limited to 'compiler/prelude/primops.txt.pp')
-rw-r--r-- | compiler/prelude/primops.txt.pp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp index 417d42ea9b..77ef9de118 100644 --- a/compiler/prelude/primops.txt.pp +++ b/compiler/prelude/primops.txt.pp @@ -1633,6 +1633,12 @@ primop ParOp "par#" GenPrimOp -- gets evaluted strictly, which it should *not* be has_side_effects = True +primop GetSparkOp "getSpark#" GenPrimOp + State# s -> (# State# s, Int#, a #) + with + has_side_effects = True + out_of_line = True + -- HWL: The first 4 Int# in all par... annotations denote: -- name, granularity info, size of result, degree of parallelism -- Same structure as _seq_ i.e. returns Int# |