Strictness of addition functions.

14 Mar
2002
14 Mar
'02
10:37 p.m.
Lately, I've been attempting to improve the performance of a highly numerically intensive program. Yet try as I might I cannot seem to define (nor find) an addition function that is strict in both its arguments. Using the advice found in the GHC Users Guide I have looked inside the .hi file and discovered that the functions I define are indeed lazy in their arguments. Even when I try something like data Pair = Pair !Int# !Int# f (Pair x y) = x +# y I still discovered to my dismay that the type of the first argument to f is U(LL). What can I do to force the arguments to be strict? ------------------------------------------------ Sean Seefried School of ITEE The University of Queensland Ph: 3365 8301 Mob: 0416 338 636
8468
Age (days ago)
8468
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sean Seefried