Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many memory the bit-vector using in sbcl?

How many memory the bit-vector using in sbcl?

Does per bit spend 1 bit memory? Does per bit spend 1 byte memory? Does per bit spend 1 word memory?

like image 983
1.618 Avatar asked Mar 04 '17 08:03

1.618


1 Answers

Bit vectors in SBCL are stored efficiently with one bit per bit, plus some small housekeeping overhead per vector.

They are also very efficient at bitwise operations, working a full word at a time. For example, BIT-XOR on a 64-bit platform will work on 64 bits of a bit-vector at once.

like image 182
Xach Avatar answered Sep 19 '22 18:09

Xach