| Bitwise &
Yesterday I learned with @viniseneda
about bitwise operations and how they can optimize the code: that’s when we make
comparisons with | and & instead of || and &&. Modern compilers do several
optimizations on their own, and these optimizations vary from compiler to compiler.
Using bitwise operators doesn’t necessarily mean you’ll have an edge in performance.
If performance is a priority we need to analyze the assembly output of the compiler
to know exactly how it handles optimizations:
- https://stackoverflow.com/questions/52137520/when-use-bitwise-operations-instead-of-arithmetic-alternatives
- https://github.com/agavrel/42-Bitwise_Operators
Today is my last day of driver’s ed 🎉🥳!