[Haskell-cafe] Re: tail-recursing through an associative list

2006-10-12 Thread apfelmus
Malcolm Wallace wrote: Seth Gordon [EMAIL PROTECTED] wrote: almost-entirely-functional code ... that in its first draft, took about three seconds to process 2,000 rows, eight minutes to process 20,000 rows, and overflowed a 1-MB stack when processing 200,000 rows. Oops. Which just goes

Re: [Haskell-cafe] Re: tail-recursing through an associative list

2006-10-12 Thread Seth Gordon
[EMAIL PROTECTED] wrote: For logarithmic access times, you should use a binary search tree like Data.Map or similar. The problem in your case could be that matchKeys is only approximate and your keys cannot be ordered in suitable fasion. That is precisely the problem that I was dealing with.