[Haskell-cafe] wordsBy in the base libraries?

Neil Mitchell ndmitchell at gmail.com
Mon Oct 22 06:38:45 EDT 2007


Hi

> If you want to guarantee that level of optimization,
> you probably have to inline everything by hand
> and not use any library functions at all. I wonder how
> much of that is already done by the compiler,
> though.

A reasonable level of optimisation for this function would be that the
predicate is invoked at most once on each character. Since its easy to
do, it would be a shame not to. The other things are all "small",
compared to the predicate whose cost is unknown.

Thanks

Neil


More information about the Haskell-Cafe mailing list