Bryan O'Sullivan wrote:

In my profile results, I find that simply converting words to lower case accounts for a whopping 40% of time and allocation (see the attachment for my definition of the train function).

COST CENTRE                    MODULE                  %time %alloc

lower                          Spell                    40.5   41.2
train                          Spell                    26.3   14.3
mkWords                        Spell                    21.9   24.1

A little more instrumentation says this (using the darcs head of fps built with -auto-all):

loopU                          NewData.ByteString.Fusion  25.4   28.8
splitWith                      NewData.ByteString         15.4   17.2
train                          Spell                      10.2    6.1
isNotAlpha                     Spell                       9.4   12.2
compareBytes                   NewData.ByteString          8.8    9.6
compareBytes                   NewData.ByteString.Lazy     7.4    0.4
inlinePerformIO                NewData.ByteString.Base     6.6    0.0

(At Stefan's suggestion, I renamed the modules in fps to NewData.*, in order to get around the name clashes when I try to concurrently use fps and base.)

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

Reply via email to