[Haskell-cafe] Nice way to calculate character frequency inastring

Simon Peyton-Jones simonpj at microsoft.com
Tue Oct 25 10:02:46 EDT 2005

| > Better still, help us make it faster!
| >
| > Simon
| What can your average Haskell user do to help other than
| point out things they don't like?

Well-characterised test cases are always motivating: small programs that
should go fast, and don't. Why does the brain-twisting version work
fast, and the obvious code go slow.  Ian Lynagh's recent message was a
good example [although I'm afraid we have still not done anything about
it] http://urchin.earth.li/~ian/bench/bench-0.2/ghc-6.4.1.html.  

The next step is to look at the intermediate code that GHC produces, and
try to see what's different about the good and bad version.

Sometimes, as Simon M's recent message mentioned, there are things that
aren't easy to change, like auto-unboxing of arrays.  Other times there
are just missing SPECIALISE pragmas and the like.  The more the problem
is characterised, the more likely we are to do something about it.


More information about the Haskell-Cafe mailing list