[ovs-dev] [eviction 01/12] util: Move bitwise_copy() here, add new bitwise functions.
Ethan Jackson
ethan at nicira.com
Tue Jan 17 16:42:56 PST 2012
> * If you consider all of 'src' to be a single unsigned integer in network byte
> * order, then bit N is the bit with value 2**N. That is, bit 0 is the bit
> * with value 1 in src[src_len - 1], bit 1 is the bit with value 2, bit 2 is
> * the bit with value 4, ..., bit 8 is the bit with value 1 in src[src_len -
> * 2], and so on. Similarly for 'dst'.
This sounds clear to me.
> I don't want to do so in this case because it could greatly increase
> the cost of the function in cases where it is very cheap.
This feels like premature optimization to me, especially given how
complex the function is. I don't feel particularly strongly about it
though so we can leave it.
Ethan
More information about the dev
mailing list