int x = n / 3; // <-- make this faster // for instance int a = n * 3; // <-- normal integer multiplication int b = (n << 1) + n; // <-- potentially faster multiplication
int x = n / 3; // <– make this faster // for instance
Share
This is the fastest as the compiler will optimize it if it can depending on the output processor.