12-17% faster than comparable algorithm with no overflow.

10 November 2025

This article is part 2 in a series of new fast date algorithms.

Part 1 introduced a new faster date conversion algorithm which outperforms existing algorithms by 2-11%. Like most fast date algorithms, it works on around 25% of the 32–bit or 64-bit range.

In this article, I explore how Hinnant’s era technique (which expands coverage from ~25% to over ~99.9% of the 32–bit range) can be applied to other fast algorithms. With a small tweak, these algorithms can then be made 12-17% faster than previous algorithms, and expand the coverage to 100% of the 32–bit range.

Although slightly slower than the narrow 25% variant, it still outperforms Boost by ~15%…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help