On 23 Oct , Simon Marlow wrote:
> [EMAIL PROTECTED] (S.D.Mechveliani) writes:
>
>> Observation:
>>
>> In ghc-2.08 (linux, PC-486), -O compilation
>>
>> "Integer is 5 times slower than Int" - even when the numbers
>> are small ( < 2^20 ).
>
> This is reasonable, considering that each integer operation involves a
> function call to the arbitrary precision arithmetic library, whereas
> Int operations are inlined.
I have a feeling that it is possible to do better than this, at least
partly by using Int internally for numbers less than 2^30 or so, and
caching intermediate results. Any pointers, Mark?
--
Jon Fairbairn [EMAIL PROTECTED]
18 Kimberley Road [EMAIL PROTECTED]
Cambridge CB4 1HH +44 1223 570179 (pm only, please)