in practice, overloading introduces overhead that might hamper
performance.

You mean overloading in general, so using type classes? Is this comparable
to the Java/C#/C++ overhead with virtual methods, so one extra level of
indirection before the function gets called? Or is it much worse?

usually, don't worry about it. if a program really is slow, still don't
worry about it, but find out where that program is slow. only if a
program is slow in an area that uses overloading, see:

   http://www.haskell.org/haskellwiki/Performance/Overloading

and even there, the advice is not to avoid overloading, but to make
sure that you use specialised versions of overloaded code (by giving
more specific type annotations or specialize pragmas, or by inlining
overloaded code into usage contexts where its overloading can be
resolved to specific types).

claus

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to