And then spend 3 million instructions to show it to the user 10 layers above in a Chrome wrapper?
CPU3命令でうるう年を判定する最適化。
bool is_leap_year_fast(uint32_t y) {
return ((y * 1073750999) & 3221352463) <= 126976;
}
A leap year check in three instructions
hueffner.de/falk/blog/a-le…
GCCの実装でも取り入れられた。
github.com/gcc-mirror/gcc…




