Re: [Haskell-cafe] Big Arrays

2010-10-06 Thread Hemanth Kapila
Thanks for the response. That sounds sequence comparison seems very impressive On Wed, Oct 6, 2010 at 2:23 PM, Ketil Malde wrote: > Hemanth Kapila writes: > > > Let us say, we are using a bit-array of size 2^43 (that is, a byte array > of > > size 2^40) to store a bloom filter. And let us furt

Re: [Haskell-cafe] Big Arrays

2010-10-06 Thread Ketil Malde
Hemanth Kapila writes: > Let us say, we are using a bit-array of size 2^43 (that is, a byte array of > size 2^40) to store a bloom filter. And let us further assume that we are > interested in a false-positive probability of 0.01 Since we are just making up numbers, let us instead say we are usi

Re: [Haskell-cafe] Big Arrays

2010-10-05 Thread Hemanth Kapila
Thanks Ketil. On Wed, Oct 6, 2010 at 1:36 AM, Ketil Malde wrote: > > Just out of curiosity, may I know a use case of such huge arrays? > > Bloom filters? > > Am probably dense - I still did not get an idea of where would one use such a big array. Let us say, we are using a bit-array of size 2^43

Re: [Haskell-cafe] Big Arrays

2010-10-05 Thread Ketil Malde
Hemanth Kapila writes: > Just out of curiosity, may I know a use case of such huge arrays? Bloom filters? > At such sizes, I thought, the array would not have the expected array > properties (constant access time) due to "thrashing". Yes, but this is true for any array size, due to the cache h

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

2010-10-04 Thread John Millikin
On Mon, Oct 4, 2010 at 01:51, Bulat Ziganshin 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 li

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 y

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@haske

Re: [Haskell-cafe] Big Arrays

2010-10-03 Thread John Millikin
On Sun, Oct 3, 2010 at 19:09, Bryan O'Sullivan wrote: > On Sun, Oct 3, 2010 at 11:54 AM, Henry Laxen > wrote: >> >> I am trying to create a (relatively) big array, >> but it seems I cannot make anything larger >> than 2^30 or so.  Here is the code: > > Use a 64-bit machine, where Int is 64 bits w

Re: [Haskell-cafe] Big Arrays

2010-10-03 Thread Bryan O'Sullivan
On Sun, Oct 3, 2010 at 11:54 AM, Henry Laxen wrote: > > I am trying to create a (relatively) big array, > but it seems I cannot make anything larger > than 2^30 or so. Here is the code: > Use a 64-bit machine, where Int is 64 bits wide. Trying to create a larger array on a 32-bit machine doesn't

Re: [Haskell-cafe] Big Arrays

2010-10-03 Thread Antoine Latter
On Sun, Oct 3, 2010 at 11:18 AM, Bulat Ziganshin wrote: > Hello Henry, > > Sunday, October 3, 2010, 7:54:49 PM, you wrote: > >> It looks like array ranges can only be Ints, and not Int64 or Word64 types. > > yes, it's Int internally got efficiency reasons. you can do your own > implementation to o

Re: [Haskell-cafe] Big Arrays

2010-10-03 Thread Bulat Ziganshin
Hello Henry, Sunday, October 3, 2010, 7:54:49 PM, you wrote: > It looks like array ranges can only be Ints, and not Int64 or Word64 types. yes, it's Int internally got efficiency reasons. you can do your own implementation to override this limit :) -- Best regards, Bulat

[Haskell-cafe] Big Arrays

2010-10-03 Thread Henry Laxen
Dear Group, I am trying to create a (relatively) big array, but it seems I cannot make anything larger than 2^30 or so. Here is the code: import Data.Word import Data.Array.Unboxed import Control.Monad.ST import Data.Array.ST import Control.Exception import Prelude hiding (catch) t1 :: Word6