www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3568] New: BitArray Indexing Should Use ulong

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3568

           Summary: BitArray Indexing Should Use ulong
           Product: D
           Version: 2.036
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: dsimcha yahoo.com



Given that the whole point of a BitArray is space efficiency so that you can
pack more into less memory, it seems silly to me that BitArrays are indexed by
size_t, thus arbitrarily preventing you from using more than 2^32 elements on
32-bit architectures.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 03 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3568




13:07:06 PST ---
2^32 bits takes up 536MB.  Do you need a bit array greater than that size?  It
seems a bit excessive to allow larger arrays, making compiled code more complex
for indexing.

Perhaps the index type can be templated if you want a larger one.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 03 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3568




Yes, I'm within earshot of needing this.  I'm working with adjacency matrices
for graphs with ~50,000 vertices.  It wouldn't take much more to hit this
limit.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 03 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3568


Stewart Gordon <smjg iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg iname.com



Where do you get 536MB from?  It's 512MB.  Nice round figure in binary terms -
it has to be.

But you've got me wondering if there's a more efficient way of storing that
kind of data....

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3568


Steven Schveighoffer <schveiguy yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy yahoo.com



05:38:05 PST ---
Like hard drives, I assert that 1MB == 1,000,000 bytes :)

2^32 bits / 8 bits per byte = 536870912 == 512 * 1024 * 1024

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3568


Leandro Lucarella <llucax gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |llucax gmail.com



PST ---
Yeap, the correct term for 1024 * 1024 is MiB (mibibyte):
http://en.wikipedia.org/wiki/Mebibyte :)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2009