Re: Array.ST is not being nice to me

2008-02-11 Thread Simon Marlow
Robert van Herk wrote: Hi all, So my theory now is: I do a large number of lookups. Try using Data.Array.Base.unsafeRead (and maybe ata.Array.Base.unsafeWrite). These avoid the bounds checking on the index each time you lookup something in the array. Right. Also keep an

Re: Array.ST is not being nice to me

2008-02-09 Thread Robert van Herk
Hi all, So my theory now is: I do a large number of lookups. Try using Data.Array.Base.unsafeRead (and maybe ata.Array.Base.unsafeWrite). These avoid the bounds checking on the index each time you lookup something in the array. Right. Also keep an eye on the GC time (+RTS

Array.ST is not being nice to me

2008-02-08 Thread Robert van Herk
Hi all, I have a problem with regards to the speed of ST arrays. In short: a Data.Map.Map outperforms Data.Array.ST in my application, whereas as far as I understand it, the ST array should be quicker. My application is a compiler. It compiles some source code into a (huge) number of boolean

Re: Array.ST is not being nice to me

2008-02-08 Thread Chris Kuklewicz
So my theory now is: I do a large number of lookups. Try using Data.Array.Base.unsafeRead (and maybe ata.Array.Base.unsafeWrite). These avoid the bounds checking on the index each time you lookup something in the array. ___ Glasgow-haskell-users

Re: Array.ST is not being nice to me

2008-02-08 Thread Simon Marlow
Chris Kuklewicz wrote: So my theory now is: I do a large number of lookups. Try using Data.Array.Base.unsafeRead (and maybe ata.Array.Base.unsafeWrite). These avoid the bounds checking on the index each time you lookup something in the array. Right. Also keep an eye on the GC time