HSB Bitwise Optimization
in
Programming Questions
•
7 months ago
I've got a project I'm pretty pleased with, but am now looking for some optimization.
Things work the way I want/need them to using HSB color mode. I'm doing a multi-pass pixel scan and summing the results. The main goal is to generate a static output, but there is some value in animating the result also, and in any case it would be great if I could figure out how to speed things up a bit.
I've eliminated get() and set() successfully, but am now looking at refactoring using bitwise operations. Do I need to convert to RGB first, and if so, would the extra calculations cancel out any benefits?
I'm perfectly happy to show my code, but I thought I'd start with a basic question to see if I'm totally barking up a wrong tree.
TIA,
RA
Things work the way I want/need them to using HSB color mode. I'm doing a multi-pass pixel scan and summing the results. The main goal is to generate a static output, but there is some value in animating the result also, and in any case it would be great if I could figure out how to speed things up a bit.
I've eliminated get() and set() successfully, but am now looking at refactoring using bitwise operations. Do I need to convert to RGB first, and if so, would the extra calculations cancel out any benefits?
I'm perfectly happy to show my code, but I thought I'd start with a basic question to see if I'm totally barking up a wrong tree.
TIA,
RA
1