Porting stuff to consoles. AAA gamedev for 15+y (ex-Crytek). Automotive stuff. CNCing old turret lathes. Writing a game in C. Father. Catholic. Swordsman/stunt.
Profiling & Optimization
Expectation:
-clever algorithms
-SoA
-hand-written SIMD
Reality:
-rewriting totally retarded stuff that makes no sense and either quadratic or exponential
-removing unneccessary abstraction and polymorphism
-adding reserve() / resize()
-removing Log()
I will soon be introducing a bill to give the public a 50% ownership stake in the largest AI companies in America.
This would guarantee that the trillions created by AI are used to improve the lives of all of us — and block oligarch decisions that harm the American people.
@signulll lt is just managerial feudalism pushing bs features.
Most startups that already got too big could afford just doing bs. burning a fuckton of money, and still profitable enough.
@LowLevelTweets also Dijkstra stole 90% of his most famous work from railroad clerks and engineers. without giving any credit at all.
Including the very fucking algo that was named after him. Not to mention semaphores or Shunting yard algo.
@MatRopert@twq_df@eeuoss On modern DESKTOP cpus, div latency is 3-4x
Not really small. if that is "not as big" for you, that worries me.
On embedded, it could be easily 6-32x
And some RISC-V doesn't even have hw div to start with. so it' extremely fucking slow, like 100x+
So maybe reconsider..
@MatRopert@twq_df@eeuoss I'm pretty sure you exlcuded like 90% of actual cpus on the market when you were thinking of "modern" cpus..
Embedded is a thing you know ;)
@twq_df@eeuoss@MatRopert I'm pretty sure if you are not already something of a junior dev before even starting university, you are a fucking retard who should never touch code ;)
@MatRopert@twq_df@eeuoss It's smarter than bombing everything with ffast-math.
This code is very clear and explicit, with well known possible side effects.
@twq_df@eeuoss@MatRopert Unfortunately no one fucking read books of old tricks anymore so posts like these are good to remind ppl to think a bit when writing code
@iquilezles I remember my mom taking photo class, they had some photo competition. All the nerds have fancy $3000+ (or more) high end Nikon cameras
My mom had a Canon. It was red, didn't even have ISO. She won.
She also made better photos (with phone) of my wedding than the pro I paid.
@twq_df@eeuoss@MatRopert how it's not good code to do an explicit optimization that messes up precision
while doing it in a random, 8mplicit, hidden way, while introducing a fuckton of other issues is totally fine for you?
@twq_df@eeuoss@MatRopert We have macros for that ;)
Those work in debug too.
But for most use cases. if you need heavy inlining, your code is retarded anyway, as you are calling a fuckton of small functions on your hot path.
@twq_df@eeuoss@MatRopert who are that 95%?
As far as I know, finance. CAD/CAM and safety critical guys would say you are fucking insane. and that is like at least 50% of all cpp users, even by conservative estimations.
Even for many deterministic shit in gamedev, you wanna avoid it like hell.
@twq_df@eeuoss@MatRopert also, finance? anything scientific?
why you guys have to be such fucking retards, instead of just writing good code that is also fast in debug builds?
@BrookeHodgman@wmksidebottom@MatRopert ffast-math will probably also fuck your wife and shit in your fridge. a small cost vs just writing non-retarded code with your hands like some animal 😂