potatotron
Well-known member
Has anyone ever tested twiddling bits in the RAM via the bitband addresses? Instead of doing things like ORing and ANDing masks like
would it be faster to do something like
If nobody's looked into this I will test it this weekend and report back. Thanks in advance.
Code:
for (mask = (1<<23) ; mask ; mask >>= 1) {
if (color & mask) {
*p++ |= bit;
} else {
*p++ &= ~bit;
}
would it be faster to do something like
Code:
for (mask = (1<<23) ; mask ; mask >>= 1) {
*p++ = (color & mask) ? 1 : 0;
}
If nobody's looked into this I will test it this weekend and report back. Thanks in advance.