Librarianon

Your local Librarianon

  • He/Him

Writer, TF Finatic, Recohoster, and Game dev. Wasnt able to post here as much as I liked, but I'll miss it and all of yall. Till we meet again, friends!


lexyeevee
@lexyeevee

is a process, not a stat, not even a progress bar

please can the Gamers stop saying things have "bad optimization" or whatever. i don't know how to kindly explain to you that the way it sounds lands squarely on a spectrum between clueless and jackass. consider the following:

  1. it is a MIRACLE that video games work. like, at all. i make video games and i can hardly believe they exist. and that's before you even get to the graphics!

    here, i'll give you all the vertex coordinates of ten thousand objects in 3D space. tell me which ones are touching. you have: 0.005 seconds. good luck

  2. making something faster while behaving the same is hard. it is really hard. it is really really fucking hard. it is one of the hardest things. if you're lucky there's some obvious low-hanging fruit that gets you far enough. beyond that it is a niche so specialized that it has no name, performed by 1 witch at your studio that no one's sure they've actually met in person, who disappears for three weeks only to reveal they've improved load times by 9% by forking ext4 to store entries in alphabetical order, whatever the fuck that even means, while the rest of you are desperately scouring stackoverflow for something bozotic like whether double-quotes are "faster than" single-quotes

  3. there is no such thing as "fast". there is only "faster", and "fast enough". you don't just keep going until you have Fully Optimized The Code because that is not a real thing. you plunk away at one thing at a time and watch your update and render times drop by microseconds, sometimes unsure whether you've even made a difference because it's drowned out by noise. maybe you made things slightly worse, even. maybe better on one platform but worse on another. cross your fingers i guess. how long until we're supposed to ship, again?

this just really grates at me because like

"it's slow for me" is a factual observation. even "it's slow for everyone" is a factual observation. "it has poor performance" is still a factual observation. "it's fucking unplayable", "runs like ass", sure

but "it's badly optimized" is a value judgement of skilled work that someone did (or lacked time/expertise to do) on code you have never read. it seems to have come out of the same vortex that produces insights like "[game] was made with the unity engine, which is why [non sequitur]" from people who are inexplicably compelled to talk about the nuts and bolts despite having never seen either a nut or bolt themselves

you can just, have opinions on video games. you don't need to try to fake sounding like maybe a programmer


DecayWTF
@DecayWTF

turning a big Dial called "Optimization" and constantly looking back to see how much i can set it to Bad because i hate gamers, especially, man's


lexyeevee
@lexyeevee

if i made a AAA video game i would simply optimize it more. i would optimize it all the way, in fact. simply do maximum optimization. stupid devs, why do they need me to tell them these basic things


tabatkins
@tabatkins

Double quotes are faster because they're sturdier.


tenna
@tenna

double quotes require more resources to process than single quotes, since they’re basically two single quotes, so it’ll take slightly longer to process. additionally, the amount of stability gained by using double quotes is negligible.


You must log in to comment.

in reply to @lexyeevee's post:

Also yes to the witch. Everyone's been fighting to pare cycles from the inner game loop for three weeks and they turn up in awful shape at standup one morning having not slept in four days. The new routine is a bunch of raw opcodes in a byte array that, insanely, means the same thing in armhf as it does in x64. It is 50% faster but no one understands how it works, them included. The CR has the original assembly but it doesn't assemble to the same set of opcodes in from either the ARM or Intel assembly source. It passed all the tests however. They do not turn up at any more team meetings. A month after launch you find out they moved to Alaska.

you don't just keep going until you have Fully Optimized The Code because that is not a real thing.

Wanted to add to this, because optimizing graphics is currently my job, and explaining things like this to my coworkers is therefore also my job.

Doing an optimization is several kinds of hard. Doing a "full optimization" is several kinds of impossible, coupled with several kinds of not well defined.

I can make benchmarks that try to represent real-world stress cases such that "code that performs well on these benchmarks will seem fast to users". Inevitably some of the assumptions I made will turn out to have been wrong. I'll have missed some rare but important real-world case and have to make updates to the benchmarks.

But let's suppose my assumptions are solid, and that I can use the benchmarks as ground truth. There's still a sense in which "optimization" is not well defined. Doing well on one test-case in one execution environment doesn't guarantee doing well on all of them. There's room in the design space to make tradeoffs, like "what if I did some extra computation to prune some potentially unneeded branches? It would make some cases faster and others slower". If I want some way to compare apples and oranges, I could make up a composite score that flattens all the results into one metric. Again, I'd be making assumptions that are definitely arbitrary and probably wrong.

But let's suppose that I've made the "right" assumptions (whatever that means). There's now some sense in which code could be said to be "optimal" with respect to that metric. Once I've fixed a scoring system, there exists some implementation out there that gets the best score. Of course, I still don't know what the best score is, and finding out is an undecidable problem.

I am currently involved in a performance project (not games, just boring business software), and the question of “are we done?” is of course obviously ridiculous, but even the question of “is it even any faster on anyone’s computer other than my own, in any situation outside of this synthetic test case?” is soooooooo much harder to answer than it seems like it should be

This reminds me of the old days when I had to regularly engage with programmers who had big-O Opinions on the relative "efficiency" of different programming languages. Because yes, the problem with your code is definitely that you're running on top of a virtual machine and not the fact that your data is stored with no plan of how to connect related elements, and you should definitely rewrite the whole thing in assembly language to trip half a percent off the runtime, assuming that it doesn't produce so much code that you have more cache misses...

This is a fair criticism and I will be altering my language accordingly.

Except with one exception: "Final Fantasy XIV 1.0 was badly optimized" is a factual statement because of shit like the flowerpot that had more polygons than a player character.

in reply to @lexyeevee's post:

knowing gamers, i would bet money that someone somewhere up the chain in the game of idiot telephone, someone vaguely knew about the -O flags on C compilers and still literally thinks that optimization is just "run it on the biggest -O".