-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lookup idx #3
base: master
Are you sure you want to change the base?
Lookup idx #3
Conversation
this cuts down setRGB duration from ~49us to ~10us!
this results in about 11us for setRGB(id, r, g, b)
progmem works fine :-) |
ok - found the missing information: i tried to generate the array with templating magic (you can find a big bunch of ideas and solutions on stackoverflow) - but they work with recursive templating calls... i have manually copied together a hardcoded lookup table for up to 2400 channels - that is 200 TLC-Chips. i think that enough for the most users ;-) |
tested with arduino beta `arduino-PR-beta1.9-BUILD-71` with OPTIMIZE_SET 1 tested on an OLIMEXINO-32U4 resulted in 9us for tlc.setRGB(idx, r, g, b)
that is it for now :-) with the last commit i implemented a compile-time generator for the idx lookup table. this compiles fine in the
to
|
Please support C++17 by default #435 |
this pull request experiments with a lookup table instead of the inline idx calculations.
--> Works!
tested if it is gaining speed:
in orig. master a call to
setRGB(id, r, g, b)
resulted in ~49usafter a hardcoded lookup-table it resulted in ~10us
so that is a nice gain!
update: in last test with Optimization activated i got to 9us :-)
TODO: