[Haskell-cafe] Question about STRef

Johannes Waldmann johannes.waldmann at htwk-leipzig.de
Thu Jan 26 13:05:52 UTC 2017


What Michael did not mention in the mail, but it's in his code:
numerals defaulted to Integer, and the story changes (somewhat)
if we force Int.

I updated my measurements:
http://www.imn.htwk-leipzig.de/~waldmann/etc/mob/
and ghc-8 looks better now - but not quite wins.

> there's still some more low hanging fruit here

... for whom? What could we reasonably expect of the compiler here?
It could do the strictification? the unboxing?

It certainly could not replace Integer by Int,
since the range of numerical values has no obvious bound.

But then, all these Integers are small, but we pay quite an overhead
(for represeting Int as Integer) which has increased for current ghcs?

- J.


More information about the Haskell-Cafe mailing list