[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Bitwise operations on bytes
On 03/29/2012 10:40 AM, John Cowan wrote:
> Alan Watson scripsit:
>> That is my specific question: did you consider including bitwise
>> operation on bytes only?
> We did not. Feel free to make a small WG1-ish proposal for them, though
> I doubt it will pass at this point.
> I'll note that in Java and C#, boolean arrays are represented with one
> (logical) bit per byte; on modern systems, the cost of setting bits is
> high enough (read-modify-write) that a factor of 8 in space is well
> worth paying. This would not be true of embedded systems.
I would expect the opposite: On modern systems arithmetic (including
bitwise operations) is effectively free, but cache misses are expensive,
so compact data structures are what counts.
You wouldn't use a read-modify-write instruction except for "volatile"
Scheme-reports mailing list