A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)
1–10 of 100 posts
Re: A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)
#2It achieves a 30–40% speed improvement on x86-64 and ARM64 (Apple M4 Pro) by reversing the direction of the year count and reducing the operation count (4 multiplications instead of the usual 7+).
Paper-style explanation, benchmarks on multiple architectures, and full open-source C++ implementation.
Re: A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)
#3A write-up of a new Gregorian date conversion algorithm. It achieves a 30–40% speed improvement on x86-64 and ARM64 (Apple M4 Pro) by reversing the direction of the year count and reducing the operation count (4 multiplications instead of the usual 7+). Paper-style explanation, benchmarks on multiple architectures, and full open-source C++ implementation.
> Years are calculated backwards
How did that insight come about?
Re: A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)
#4Re: A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)
#5i'm placing my bets that in a few thousand years we'll have changed calendar system entirely haha
but, really interesting to see the insane methods used to achieve this
Re: A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)
#6Re: A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)
#7[0]: https://github.com/kccqzy/smartcal/blob/9cfddf7e85c2c65aa6de...
Re: A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)
#8Nice to see the micro-optimising folks are still making progress on really foundational pieces of the programming stack
Re: A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)
#9Re: A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)
#10> The algorithm provides accurate results over a period of ±1.89 Trillion years i'm placing my bets that in a few thousand years we'll have changed calendar system entirely haha but, really interesting to see the insane methods used to achieve this
But if it’s just about starting over from 0 being the AI apocalypse or something, I’m sure it’ll be more manageable, and the fix could hopefully be done on a cave wall using a flint spear tip.