Saturday Is Coming Faster - Convert year_month_day to Weekday Faster - Part 2
summary
Claims a new calendar routine that converts year_month_day to weekday up to 3x faster than the usual chrono path and shows the actual arithmetic behind it: using octal representation to exploit modulus 7, constructing a fractional multiplier M with 32 important bits after the point, replacing division by a multiply plus a right shift by 29 bits, and deriving the exact constant so the trick reproduces correct weekdays across the tested range.
AI-written summary · about
related talks
01h 01mA <chrono> Tutorial
01h 00mFloating-Point <charconv>: Making Your Code 10x Faster With C++17's Final Boss
01h 41mFast Conversion From Cpp Floating Point Numbers
57mFloating-Point to String Conversion in C++: Exploring Algorithms & Performance
06mLightning Talk: A Compiler Optimization and the 2-Adic Numbers
01mTalk Preview: A new dragon in the den: fast conversion from floating-point numbers
11mPrinting floating point numbers is surprisingly hard!!
58mPortable floating-point calculations
