Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Isaacs <75862+ben-xo@users.noreply.github.com>2021-08-26 19:19:39 +0300
committerBen Isaacs <75862+ben-xo@users.noreply.github.com>2021-08-26 19:19:39 +0300
commited0a7edd2f89b80c84a950b9b046f40a96737034 (patch)
tree5beaf138859c44ca858218b34711ff4ea7576a99
parentf705f549d83d0d97530581e6470eed0490cc942a (diff)
Using an | instead of + is 4 instructions faster.
-rw-r--r--src/lib8tion/math8.h2
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 (