Re: Re[2]: [Haskell-cafe] Big Arrays

2010-10-04 Thread Hemanth Kapila
Just out of curiosity, may I know a use case of such huge arrays?
At such sizes, I thought, the array would not have the expected array
properties (constant access time) due to thrashing.

thanks,
Hemanth
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Big Arrays

2010-10-04 Thread Bulat Ziganshin
Hello John,

Monday, October 4, 2010, 7:57:13 AM, you wrote:

 Sure it does; a 32-bit system can address much more than 2**30
 elements. Artificially limiting how much memory can be allocated by
 depending on a poorly-specced type like 'Int' is a poor design
 decision in Haskell and GHC.

are you understand that the poor design decision makes array access
several times faster and doesn't limit anything except for very rare huge
Bool arrays?


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

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


Re: Re[2]: [Haskell-cafe] Big Arrays

2010-10-04 Thread John Millikin
On Mon, Oct 4, 2010 at 01:51, Bulat Ziganshin bulat.zigans...@gmail.com wrote:
 Hello John,

 Monday, October 4, 2010, 7:57:13 AM, you wrote:

 Sure it does; a 32-bit system can address much more than 2**30
 elements. Artificially limiting how much memory can be allocated by
 depending on a poorly-specced type like 'Int' is a poor design
 decision in Haskell and GHC.

 are you understand that the poor design decision makes array access
 several times faster and doesn't limit anything except for very rare huge
 Bool arrays?

I don't see how using 'Int' instead of 'Word' makes array access
several times faster. Could you elaborate on that?

The important limited use case is an array of Word8 -- by using 'Int',
byte buffers are artificially limited to half of their potential
maximum size.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe