Of course, in this particular case, worrying about the overhead of manipulating an Integer when you are in the process of jumping through the hoops to put your thread to sleep is somewhat silly. ;)

In general though, using Ints by default is a reasonable performance compromise.

-Edward

On Wed, Mar 30, 2011 at 2:59 PM, Daniel Fischer <daniel.is.fischer@googlemail.com> wrote:
On Wednesday 30 March 2011 20:47:37, Wolfgang Jeltsch wrote:
> Can’t Integer be implemented in a more efficient way that it’s done
> currently?

Theoretically, sure. Practically, everything above a minor speedup would be
very hard, I think.
And, as Johan mentioned, Integers can't be unpacked, I don't see how that
could be achieved, so for IntMap and the like, performance would be
drastically worse even if Integer manipulation itself got significantly
faster.

_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries