2 points · by itamarst · 3y ago · 1 comment
https://github.com/szabolcsdombi/optimized-floyd-steinberg-d...
X * 7 is equal to (X << 3) - X
X * 3 is equal to (X << 1) + X
X * 5 is equal to (X << 2) + X
Speeding up your code when multiple cores aren’t an option
Parallelism isn’t the only answer: often you can optimize low-level code to get significant performance improvements.
Python⇒Speed