[Haskell-cafe] Re: Performance question

Arnoldo Muller arnoldomuller at gmail.com
Fri Mar 19 09:02:25 EDT 2010


Thank you all, I will apply your suggestions to my function.

Thank you for making the process of learning Haskell much easier!

Arnoldo

On Fri, Mar 19, 2010 at 4:21 PM, Achim Schneider <barsoap at web.de> wrote:

> Arnoldo Muller <arnoldomuller at gmail.com> wrote:
>
> > Right now, the bottleneck of my program is in binarySearch', the
> > function must be called a few billion times.
> >
> > Do you have any ideas on how to improve the performance of this
> > function?
> >
> The fastest way to do a binary search is to reify it into code using
> TH, in Van Emde Boas layout if it's a big enough search (so that you
> get less cache misses)
>
> This might of course get tricky if your tree isn't compile-time static,
> but if you're really doing gazillions of lookups, occasionally
> compiling+dynamically linking code might well be worth it.
>
> --
> (c) this sig last receiving data processing entity. Inspect headers
> for copyright history. All rights reserved. Copying, hiring, renting,
> performance and/or quoting of this signature prohibited.
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100319/d06f6e5c/attachment.html


More information about the Haskell-Cafe mailing list