a bunch of smaller speedups to core functions

*  make local functions "static"
* use fast_ int types where possible
* use native min/max instead of MIN/MAX macros. Macros evaluate each parameter TWICE!!
* adding __attribute__((pure)) and __attribute((const)) to help the compiler optimize
* ws.cpp: reduce max "live leds" in fastpath mode
This commit is contained in:
Frank
2023-04-30 18:41:30 +02:00
parent fb03a37b08
commit 40c96c14f5
10 changed files with 109 additions and 104 deletions

View File

@@ -293,7 +293,7 @@ void handleNightlight()
}
//utility for FastLED to use our custom timer
uint32_t get_millisecond_timer()
uint32_t __attribute__((pure)) get_millisecond_timer() // WLEDMM attribute pure = does not write other momory
{
return strip.now;
}