diff options
author | Ben Isaacs <75862+ben-xo@users.noreply.github.com> | 2021-08-26 19:19:39 +0300 |
---|---|---|
committer | Ben Isaacs <75862+ben-xo@users.noreply.github.com> | 2021-08-26 19:19:39 +0300 |
commit | ed0a7edd2f89b80c84a950b9b046f40a96737034 (patch) | |
tree | 5beaf138859c44ca858218b34711ff4ea7576a99 | |
parent | f705f549d83d0d97530581e6470eed0490cc942a (diff) |
Using an | instead of + is 4 instructions faster.
-rw-r--r-- | src/lib8tion/math8.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib8tion/math8.h b/src/lib8tion/math8.h index fe355e89..61b12e6a 100644 --- a/src/lib8tion/math8.h +++ b/src/lib8tion/math8.h @@ -504,7 +504,7 @@ LIB8STATIC uint8_t blend8( uint8_t a, uint8_t b, uint8_t amountOfB) // result = 256*A + B - A*amountOfB + B*amountOfB // 1 or 2 cycles depending on how the compiler optimises - partial = (a << 8) + b; + partial = (a << 8) | b; // 7 cycles asm volatile ( |