David Roundy wrote:
[ something that every C programmer dreams of ]
I'm not going to answer, I'd be just vapour-waring around.
But, yes, any-alignment any-granularity reads can be done in O(1), with
1 ranging from case to case from one instruction to a few shifts and
&'s, plus some constant cost to choose the appropriate function based
on current alignment, which could be set by things like snapToByte,
snapToWord, snapToInt128, getBit, getBits , getByte,
GetWhatever and one state var to change the "advance mode" from
request-sized to constant-sized.
As I said, I'm vapour-waring.
But then it's a swiss army knife. With many general- and
special-purpose functions.
--
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited.