Bitarrays in the age of 64bit

Faux Amis faux at amis.com
Sun Apr 5 10:43:27 UTC 2020


On 2020-04-04 02:47, Jonathan M Davis wrote:
> On Friday, April 3, 2020 1:31:52 AM MDT Dominikus Dittes Scherkl via
> Digitalmars-d wrote:
>> It was said that implementing bitarrays is complicated, because
>> of the indexing.
>>
>> Has anybody ever considered to use bit-pointers?
>> Nobody really uses the full address range that 64bit pointers
>> have - in fact some hardware internally still uses 48bit or 56bit
>> address-registers, so instead adding three lower address bits
>> would not cost a lot (just forward bit 3..58 to the register
>> instead of bit 0..55).
>> This would also allow for implementing 2bit-types (one that I
>> really would appreciate, because it can represent sign values,
>> providing -1, 0, 1 and NaN - which is necessary as a comparison
>> result for non-ordered values), and 4bit-types (so called
>> nibbles).
>> And with bit-pointers of course implementing arrays of boolean,
>> sign, nibbles or even odd-length types would be straight forward.
>> All the strange side-effects of byte clustering would vanish.
>>
>> Just an idea.
> 
> It has of course been a while since I saw this talk, since I haven't watched
> it since it was live (so I may be remembering wrong), but it sounds like
> this talk from dconf 2016 might be applicable:
> 
> http://dconf.org/2016/talks/sechet.html
> 
> - Jonathan M Davis
> 

Where did all the dconf 2016 videos go?



More information about the Digitalmars-d mailing list