Performance/Integers
From HaskellWiki
< Performance(Difference between revisions)
DonStewart (Talk | contribs) (Some performance comments on Integers) |
BrettGiles (Talk | contribs) (Adding performance infobox for great navigation options.) |
||
Line 1: | Line 1: | ||
− | '''Integers''' |
+ | {{Performance infobox}} |
+ | ==Integers== |
||
''Int'' (the machine word-sized integer type) is faster than the arbitrary |
''Int'' (the machine word-sized integer type) is faster than the arbitrary |
||
Line 5: | Line 5: | ||
like inner loops. |
like inner loops. |
||
− | That being said, Haskell (or at least GHC's) ''Integer'' are very fast, |
+ | That being said, the Haskell (or at least GHC's) implementation of ''Integer'' is very fast, |
as far as arbitrary precision arithmetic goes. |
as far as arbitrary precision arithmetic goes. |
Revision as of 19:05, 17 February 2006
Haskell Performance Resource
Constructs: Techniques: |
Integers
Int (the machine word-sized integer type) is faster than the arbitrary precision Integer type. So don't use Integer in critical places, like inner loops.
That being said, the Haskell (or at least GHC's) implementation of Integer is very fast, as far as arbitrary precision arithmetic goes.