~/lightning

Saturday Is Coming Faster - Convert year_month_day to Weekday Faster - Part 2

Lightningat CppCon 2024 · on Sunday, 2024-09-15· [compilers-and-language-design]
links:none on file
slides:none on file

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

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.