If you have hot loops with millions of iterations at a time, structure your code accordingly. Its not anti-OO to choose the right data structure for the job.
Working set and algorithm diagonalization (work independence) FTW. Immutable data structures and copying often helps to avoid cache invalidation penalties.
I already know I'm dealing with huge perf issues caused by ORM & lazy-load semantics. I/O abuse is usually going to be so, so much worse than memory/cache issues. Java is mainly used for business information systems, where I/O is king. Plain vanilla memory abuse is also a big one.
But my main problem is a mgmt convinced the magic wand of AI will make all sorts of problems dissapear, and it's going to take 5 years for them to realize nope.
It's still fun to learn about cache optimization though, esp. when someone makes it reasonably digestible like this. And maybe it also helps people to recognize that OOP is not some great over-arching zen truth of truths.
A sibling comment also mentioned Jai. Not sure what I am missing that the original post was explicitly referring to Jai, some inside joke maybe?
I am sorry, I only know Odin. Jai is this cult on reddit/discord, right? You get access if you socialize enough or something? Not my thing. Not for a language.
I was just throwing out an idea. I had no idea there were already implementations! Because, to my knowledge, conventional popular languages like C/C++/C#/Java/JS/Python don't do that, and automatically doing that (under certain conditions) feels like an easy performance win.
For what it’s worth, a common example of the capabilities of c++26 reflection is exactly this use case. I can’t remember where I first saw it, but this article [0] showcases the technique pretty well. It’s opt-in so not the compiler optimization that you’re imagining but still neat that it’s possible
Ah. So, the context (Which I read too far into evidently): 1: One of Jai's initial primary marketing points was to address exactly this: SoA performance with AoS ergonomics. 2: Odin is (or was initially) inspired by Jai.
> The Man versus Horse Marathon is an annual race over 21 miles (34 km), where runners compete against riders on horseback through a mix of road, trail and mountainous terrain. The race, which is a shorter distance than an official marathon road race, takes place in the Welsh town of Llanwrtyd Wells every June.
> ...
> The event started in 1980, when local landlord Gordon Green overheard a discussion between two men in his pub, the Neuadd Arms. One man suggested that over a significant distance across country, man was equal to any horse. Green decided that the challenge should be tested in full public view, and organised the first event.
While the horses had a string of wins from 2008 to 2019, 2022 to 2025 had three wins for humans and one win for a horse.
The Man vs Horse marathon is interesting but in a real race we have no actual chance of winning.
There are horse endurance races where the winner arrived in 7,5 hours after 160km[1]. That's a sub 2-hours marathon almost 4 times in a row (not to mention with a guy on your back).
“in a real race we have no actual chance of winning” is an absolutely wild thing to say in response to a link to a real race in which the human has won the last few years in a row.
The race is pretty much designed to be a difficult for horses as possible to give humans a chance. Except for the parts that are extremely difficult for horses, horses steamroll the human competitors.
Wow, seems surprisingly balanced. I would guess that if it was 50% longer distance than humans would win reliably, and 50% shorter would allow the horses to win?
Think it's more to do with hilly, wooded courses unfavourable to horses and a requirement that the horse's heart rate remain below a certain threshold when inspected by a vet in the middle and end of a course, whereas the leading humans are maxing out their efforts
I don't think the Mongol cavalry would lose races to humans over any distance of steppe
> Lobb’s victory came on a hot day, as did Florian Holzinger’s subsequent victory in 2007—a significant detail, according to a new study in the journal Experimental Physiology from Lewis Halsey of the University of Roehampton in Britain and Caleb Bryce of the Botswana Predator Conservation Trust. Halsey and Bryce gathered historical data from three endurance races that pit humans against horses, including the Man Versus Horse Marathon, to test the idea that humans are uniquely adapted to run for long distances in hot weather.
> This idea has been around since the 1980s, and it gained prominence when Harvard anthropologist Daniel Lieberman and University of Utah biologist Dennis Bramble published a 2004 Nature paper hypothesizing that running had “substantially shaped human evolution.” They argued that our ability to keep running at a moderate pace even on hot days allowed us to run prey like kudu to exhaustion or outcompete other animals in the race to scavenge carcasses left by other large predators.
There's a plot with the analysis of the Old Dominion with weather stations in there that show a steeper negative slope for horses compared to the humans.
> Overall, for every increase of 1 degree Celsius (1.8 degrees Fahrenheit), the horses slowed down by about 1 percent—or 0.07 miles per hour, to be precise. The humans, on the other hand, slowed down by just 0.04 miles per hour for each extra degree of heat. That 36 percent advantage for the humans was statistically significant.
---
For the Man vs Horse, the weather conditions ("Hot", "Rain/sun/windy" - not exact values)... the entry for 2022 was the human winning by 1:51 on a warm day, and 2023 was a human wining by 9:44 on a sweltering day.
> ... There are other Man versus Horse races — in Scotland based at Dores, near Loch Ness, in Central North Island, New Zealand and in the U.S. city of Prescott, Arizona.
I think the term is persistence hunting (https://en.wikipedia.org/wiki/Persistence_hunting). There was an intriguing blog post years ago (which sadly I can’t find) about how terrifying a fictional portrayal of persistence hunting would be- grinding down prey through exhaustion, thinking you’ve escaped but being slowly tracked down.
To what end? Such that you can wait out your days in a secluded bunker posting online trying to convince anyone to believe you as to the reason you've put yourself in the bunker?
Because otherwise, 'it' will just back out of your trap and go along to continue to follow, wouldn't it?
Probably more of a city design problem. Even modest exercise like walking your 8000 steps has a huge effect size. Exercise is a much more effective intervention than diet alone. America is designed to make people fat. There are places in America that don't have sidewalks. Sidewalks! It'd be funny if people weren't dying from it
There’s a fascinating case study on how this happens - Mexico had population much less overweight than USA until NAFTA was agreed to and cheap USA processed foods began inroads so that now Mexico has close to the same obesity issue that the USA has.
Calculators give you the right answer. AI gives you any answer. I work within a bureaucracy and instead of optimising processes and getting rid of useless documents, AI is being used to generate more useless text. It is the industrialisation of bureaucracy and it is a turbo powered waste of resources.
Then your issue isn't with AI, it's with your bureaucracy. Just because your company is holding it wrong doesn't mean the entire technology is morally fraught.
If your company's goal is to generate "more useless text" they would have done it with or without AI. AI just let's the peons responsible for producing that text do so significantly faster, with some percentage loss in "quality" baked in. Are you mad their jobs are easier? Was their text once not useless and now it is?
Again, it's like saying the conveyor belt is evil because it lets us generate more useless toys/candy/guns/... and research into improving the conveyor belt should instead be going toward more valuable things. However it ALSO has those effects on EVERYTHING. It lets you produce more drugs, books, food, clothes, necessities, and yes, some useless items too.
Same with AI. Sure you can use it to spew cat pictures, but you can also use it to generate significant quantities of non-trivial useful (not necessarily bullet proof, but undoubtedly _useful_) output in a fraction of the time and/or HUMAN capital (butts-in-seats, time-on-task, ...) than before. Now, as always, value is in the eye of the beholder (which is why your C suite gets giddy at all the useless text output).
I have had a little success by arguing that "we can live without AI, but we can't live without X" and then I've managed to get some priorities in order. The AI craze is insane and it does have some support inside IT but it's the pressure from outside that's hard to resist.
I spent many holidays in Uruguay in the 80s and early 90s.
I loved cartoons, but TV was only on at 10am, so I had to go out and play. If we went to my grandparents' beach house, there was an old vacuum tube TV that took hours to heat up so mostly I didn't bother to use it. I watched Tyson's defeat to Buster Douglas on that TV and the next morning there was still a little point of light in the centre of the screen because it also took a long time to go completely blank.
So not having access to TV was liberating. I wouldn't mind having no Internet on weekends today.
reply