digitalmars.D - Re: Bit type?
- Dan <murpsoft hotmail.com> Nov 24 2007
- BCS <ao pathlink.com> Nov 24 2007
- Dan <murpsoft hotmail.com> Nov 25 2007
Stewart Gordon Wrote:Meanwhile, Phobos has std.bitarray. I also have a bit array implementation capable of arbitrary slicing: http://pr.stewartsplace.org.uk/d/sutil/
Yeah, more or less.4-bit type? I guess some of the bit array code could be modified to give nibble arrays, if that's what you mean.... Stewart.
Yeah okay. A nibble[] then. Or I might opt to go a little smaller. See, while almost no complex operations are done on DNA, pattern-matches are done often, and trying to do that on the human genome is to pattern-match against 3 billion base-pairs (6GB if you're tight-ship, 24GB if you use char) My guess is that the process would be an exercise in DMA and cache prefetch timing. So back on subject, how does one implement a nibble[] without a nibble type? Would I be using a struct containing byte[] and overloading opIndex and such to reflect half the "nibble" index into the "byte" index? : p
Nov 24 2007
Reply to Dan,Stewart Gordon Wrote:Meanwhile, Phobos has std.bitarray. I also have a bit array implementation capable of arbitrary slicing: http://pr.stewartsplace.org.uk/d/sutil/
4-bit type? I guess some of the bit array code could be modified to give nibble arrays, if that's what you mean.... Stewart.
See, while almost no complex operations are done on DNA, pattern-matches are done often, and trying to do that on the human genome is to pattern-match against 3 billion base-pairs (6GB if you're tight-ship, 24GB if you use char)
your off by a factor of 8 (or swaped B and b) 3 * 1024^3 * 2 bits = 6Gb = 0.75GB 3 * 1024^3 * 8 bits = 24Gb = 3.00GB but 2.25 GB is still a lot of RAM and IO.
Nov 24 2007
BCS Wrote:Reply to Dan,Stewart Gordon Wrote:Meanwhile, Phobos has std.bitarray. I also have a bit array implementation capable of arbitrary slicing: http://pr.stewartsplace.org.uk/d/sutil/
4-bit type? I guess some of the bit array code could be modified to give nibble arrays, if that's what you mean.... Stewart.
See, while almost no complex operations are done on DNA, pattern-matches are done often, and trying to do that on the human genome is to pattern-match against 3 billion base-pairs (6GB if you're tight-ship, 24GB if you use char)
your off by a factor of 8 (or swaped B and b) 3 * 1024^3 * 2 bits = 6Gb = 0.75GB 3 * 1024^3 * 8 bits = 24Gb = 3.00GB but 2.25 GB is still a lot of RAM and IO.
b : p
Nov 25 2007