Software developer. Date & time enthusiast. Math and Cartography dabbler.

Sydney
Joined July 2007
New blog post is out! A Zoomable Equal-Area Map. Equal-area maps are now recommended by the UN, but devs usually prefer the Mercator projection. This new map combines both map types with a very simple mathematical formula. benjoffe.com/map
1
1
4
255
Ben Joffe retweeted
Some of the best technical writing I've read lately (and I'll preface this recommendation by saying I've been doing perf for 20 years and never seen datetime being really hot on a profile): there's this autistic motherfucker whose hobby is micro-optimizing date functions and writing about it. It's fucking amazing. Some people go to orgies and shit on their spare time but this being of pure light has got a whole series of posts where he dives deep into a different date function, all the way down to assembly, with genuinely insane algorithmic approaches. My favorite one is where he comes up with a new way to compute weekday from an epoch by abusing the fact that 7 (the number of days in a week) is a Mersenne prime. The performance work is incredibly thorough, providing and benchmarking different implementations of the same techniques for both throughput and latency (something you rarely see in micro-optimizations).
14
43
3
786
29,418
Just posted the next entry in the fast-date series! This time, a faster way to convert a timestamp ➜ Hour, Min, Sec. benjoffe.com/fast-time-of-da…
1
2
2
17
1,282
Ben Joffe retweeted
Asking a computer what day of the week a particular date falls on sounds simple, but there’s a surprisingly deep rabbit hole behind it. @benjoffe found a much faster way to handle the usual, and expensive, calculation using multiplication and bit shifts. news.ycombinator.com/item?id…
2
3
80
8,850
A new datetime blog post is up! This time, low-level algorithms for computing the day-of-the-week, around 2-3x faster than usual: benjoffe.com/fast-day-of-wee…
3
9
4
36
13,674
Replaced the civilFromDays algorithm in zeit with @benjoffe's new one. 5.3x faster than the previous one I had used (Hinnant) on my M4. 💪
2
1
1
24
4,639
A faster full-width is-leap-year function: benjoffe.com/fast-leap-year
3
426
Counting dates backwards for a 30-40% speed gain: benjoffe.com/fast-date-64
1
5
13
2,471
New Fast Date Algorithms Part 2 - Overflow Safe benjoffe.com/safe-date
3
449
A New Faster Algorithm for Gregorian Date Conversion benjoffe.com/fast-date
2
382
I have published a new paper: The Smoital System — A method of timekeeping on Mars based on UTC marspapers.org/paper/Joffe_2…
1
243
Check out my new Web App: benjoffe.com/weekle It teaches you to easily calculate the day of the week for any date. It includes a daily game, my result for Day 1: ⭐⭐⭐ 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 Streak: 1️⃣ Perfect Streak: 1️⃣ #weekle
1
3
11
623
GreasePig has created an animated history video for all the champions and top 10 throughout history in Perfect Dark, give it a watch! youtube.com/watch?v=AiRcPDdH…
Kicking off a new YouTube series, video game speedrunning history visualisations: youtube.com/watch?v=XpounXuq…
4
Ben Joffe retweeted
Love these charts:
175
8,267
1,072
14,381
Long data tells even more than big data. Time is longer than it is wide. Diachronic versus synchronic. wired.com/2013/01/forget-big…
2
59
14
117
Ben Joffe retweeted
The number of new games on Steam by month
18
209
33
291
Replying to @MrHonner @benjoffe
We once insured a $100 million prize in a poker tournament. Probably good that I read this article well afterwards :)
1
2
Can you stack a deck so that no matter where the cards are cut the dealer wins? Yes! @benjoffe shows how: benjoffe.com/holdem
1
1
5