News for hackers. Stuff that matters.
Re:Almost Always Unsigned by jstimpfle on Sunday January 02, 2022 @06:18AM (#29767817)
I don't write Java, but a good way to deal with this might be to cast to int (a larger type) immediately after loading a byte and before working with it. So, complexity-wise, the overhead of signed byte vs unsigned byte should be at most two casts, and often casting to a larger type would be required anyway even for operations with unsigned byte values.

There are no comments on this comment yet.