How do I check the optimisation level of the built-in splitAt?
Is something other than -O2 giving me my speed increase?
Simon Marlow
marlowsd at gmail.com
Thu May 15 05:31:32 EDT 2008
Richard Kelsall wrote:
> Hello Glasgow-Haskell Users,
>
> It was suggested to me in this thread in Haskell-Cafe
>
> http://www.haskell.org/pipermail/haskell-cafe/2008-May/042797.html
>
> which was a subsidiary of a previous thread
>
> http://www.haskell.org/pipermail/haskell-cafe/2008-April/042155.html
>
> that there might be some reason other than the -O2 optimisation level
> I applied to my version of splitAt that was making my program run about
> 30% faster than when I used the built-in splitAt.
>
> Can somebody tell me how to check what the -O level is for the built-in
> splitAt? Or alternatively tell me what the optimisation level is for
> the libraries.
>
> (Sorry I'm not sure of the right terminology for these built-in /
> library / Prelude things.)
It's hard to tell what optimisation level your libraries were compiled
with. The default setting is -O, but when building binary distributions we
usually set it explicitly to -O2. If you got your binary from another
source, they might have only used -O.
Cheers,
Simon
More information about the Glasgow-haskell-users
mailing list