Re: [Scheme-reports] Bitwise operations on bytes
Aaron W. Hsu 29 Mar 2012 20:17 UTC
On Thu, 2012-03-29 at 12:11 -0700, Per Bothner wrote:
> 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"
> accesses.
I can report at least one system (not Scheme) that I know promotes
bitvectors to bytevectors for speed purposes precisely because masking
out the bits is too expensive. In my own tests this has been born out
as well.
--
Aaron W. Hsu | arcfide@sacrideo.us | http://www.sacrideo.us
Programming is just another word for the lost art of thinking.
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports