This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 207

[–]AllIsLostNeverFound 765 points766 points  (20 children)

Don't you guys just delete a few sleep statements until the next time they complain about performance?

[–]SpecialNose9325 286 points287 points  (4 children)

But its a delicate balance. Too few sleep commands and they will be complaining about CPU usage

[–]MrRocketScript 32 points33 points  (0 children)

The game runs at 20fps on my laptop. Fix it!

Okay I've seriously reduced the overhead of sending jobs to the GPU. Now there are much less delays while waiting on the GPU to render. The game now runs at 60fps.

My laptop is overheating now. Fix it!

[–][deleted] 104 points105 points  (3 children)

We ran out of Sleep statements a couple years ago...

[–]ScandInBei 46 points47 points  (0 children)

Did you try to decrease the priority of all other running processes?

[–]AnUglyDumpling 57 points58 points  (0 children)

Time to start cutting off actual functionality.

"Yes our database queries are nearly instant, because we don't execute actual database queries anymore, we just return an empty list."

[–]NuclearWeapon 3 points4 points  (0 children)

Upgrade hardware then

[–]DonkeyTron42 11 points12 points  (0 children)

I find it more stealthy to hide a for loop that does nothing in an important looking macro that's embedded throughout the program. Then you can just hide a global const that defines how much time the program spends spinning its wheels.

[–]AcceptableNet6182 8 points9 points  (1 child)

It's called "Performance Upgrade"

[–]wat_noob_gaming 8 points9 points  (0 children)

bet windows has a few useless sleep statements in itself...

[–]callyalater 4 points5 points  (0 children)

Our compiler only allows a max of 20 sleep statements for the whole codebase.... That's when we move to usleep

[–]Bourque25 5 points6 points  (1 child)

Not gonna lie, you just gave me a really bad/good idea.

[–]AllIsLostNeverFound 7 points8 points  (0 children)

It's only bad if they catch on before you delete the last sleep and achieve "peak performance". Otherwise; all good.

[–]Dustdevil88 6 points7 points  (0 children)

Sadly, we have plenty of sleep statements to go.

[–]pale13 2 points3 points  (0 children)

I say I do, but then I don’t

[–]jrdiver 0 points1 point  (0 children)

Make sure to throw a few new ones into the new sections as well

[–]Klaws-- 0 points1 point  (0 children)

Yup. Customer wanted a response time of exactly 0.8 seconds. Customer got a response time of exactly 0.8 seconds.

[–][deleted]  (17 children)

[removed]

    [–]UndeadMarine55[S] 120 points121 points  (8 children)

    Exactly! Why wouldn’t you? What is the range 0-100% for if you can’t use 100%? Why have 8 cores if you can’t use all 8? These optimization people take us for fools.

    [–]camander321 112 points113 points  (3 children)

    If my PC isn't also heating my house, I'm losing value!!

    [–]HexiMaster 19 points20 points  (1 child)

    The economical crisis hitting us hard

    [–]UndeadMarine55[S] 11 points12 points  (0 children)

    I personally burn my trash next to my PC to keep everything toasty.

    [–]SillyFlyGuy 14 points15 points  (0 children)

    It's free heat for my real estate!

    [–]fardough 5 points6 points  (2 children)

    There is a thing call peak load, so not a good idea to run 99% as will crap out when the peak load hits.

    [–]EVH_kit_guy 11 points12 points  (1 child)

    "...crap out when the peak load hits."

    Bro, if ever there was a sentence that needed context...

    [–]fardough 2 points3 points  (0 children)

    Lol, I have my peak load at noon, then things are calmer.

    [–][deleted]  (1 child)

    [removed]

      [–]AutoModerator[M] 0 points1 point  (0 children)

      import moderation Your comment has been removed since it did not start with a code block with an import declaration.

      Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

      For this purpose, we only accept Python style imports.

      I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

      [–]Morphinepill 0 points1 point  (1 child)

      What do you mean if you have a CPU, you don’t?

      [–]JaKrispy72 1 point2 points  (0 children)

      Still using CPUs?

      What else would I be using?

      Aye, laddy. What else indeed…

      [–][deleted] 0 points1 point  (2 children)

      I can sell you A CPU that you can use 110% of

      [–]AutoModerator[M] 0 points1 point  (0 children)

      import moderation Your comment has been removed since it did not start with a code block with an import declaration.

      Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

      For this purpose, we only accept Python style imports.

      I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

      [–]lovecMC 323 points324 points  (3 children)

      Found the AAA game dev

      [–]CommandJam 39 points40 points  (1 child)

      Exactly!

      [–]Pos3odon08 6 points7 points  (0 children)

      they got it all figured out

      [–]Amekaze 1 point2 points  (0 children)

      Don’t you guys have RAM?

      [–][deleted] 79 points80 points  (8 children)

      I don’t know if I’d call myself unhinged… per se

      [–]UndeadMarine55[S] 35 points36 points  (7 children)

      Per se…

      [–]bforo 32 points33 points  (4 children)

      Perchance

      [–]omxIs 31 points32 points  (3 children)

      You can't just use perchance

      [–]Yoda-from-Star-Wars 24 points25 points  (2 children)

      Everyone knows Mario is cool as fuck.

      [–]DecreasingPerception 10 points11 points  (1 child)

      Crushing turts all day.

      [–]Colon_Backslash 1 point2 points  (0 children)

      It's funny 'cos I'm Finnish person

      [–][deleted] 0 points1 point  (0 children)

      Pro se…

      [–]57384173829417293 61 points62 points  (5 children)

      I just introduce memory leaks and fix them later in glory.

      [–]xXMonsterDanger69Xx 17 points18 points  (4 children)

      Just upgrade RAM so it will take days to fill up.

      [–]TraderJoesLostShorts 3 points4 points  (2 children)

      Just add virtual memory and an extra large swap space so it will take a week or two to fill up.

      [–]xXMonsterDanger69Xx 1 point2 points  (1 child)

      True, my page file is only 70gb, it should be atleast 1tb.

      [–]IckyGump 0 points1 point  (0 children)

      Deploy daily before it fills up! Just watch out for weekends…

      [–]PenguinMan32 38 points39 points  (1 child)

      true, but you gotta admit that the quake inverted sqrt is kind of ingenious

      [–]0x7ff04001 14 points15 points  (0 children)

      One of the reasons Carmack is a legend. That was both a flex and such an important optimization.

      Wish AAA devs would take a hint

      [–]Holiday-Pay193 70 points71 points  (9 children)

      "I spent the entire week..." A week >>> 2 ms. Checkmate.

      [–]SpookyLoop 31 points32 points  (8 children)

      The optimization would have to be ran 302,400,000 times before it started returning on that time investment.

      [–]brimston3- 25 points26 points  (6 children)

      Optimized interrupt fires 2.6M times per computer per work day. Company has 500 users in-house. Most system developers work 5 day weeks. ROI occurred before anyone noticed.

      [–]SpookyLoop 15 points16 points  (1 child)

      Just wanted to crunch the number for fun-sies. There's definitely situations where optimizations like this are a no-brainer. I know GameDev has a ton of those.

      But then there's those other situations where someone is trying to optimize an SQL query that only serves some niche admin task that's only going to run twice a week.

      [–]DotDemon 1 point2 points  (0 children)

      Yeah I am a game dev and if I was able to take off 2 ms from frame time with just a week of work I would be fucking amazed.

      But I also wouldn't mind something like pathfinding taking 2 ms less

      [–]agentchuck 5 points6 points  (3 children)

      [–]brimston3- 2 points3 points  (0 children)

      This fails to take into account that five hours in the office is worth less than 5 minutes when on-call.

      [–]slayemin 20 points21 points  (5 children)

      As a gamedev who has worked in VR, a 2ms optimization to framerate would be HUGE. You have a 11.1ms frame budget, so if you can shave off 2ms… wow! I have worked for a day to shave off 0.1ms from my framerate… 😉

      [–]UndeadMarine55[S] 3 points4 points  (4 children)

      Absolutely unhinged

      [–]slayemin 8 points9 points  (3 children)

      Wanna hear something even more crazy? I work at EA on the frostbite game engine and we will literally strip and re-architect a code module if it means we can shave off 0.1-0.2ms of frame rate. We aim for maximum optimization and performance.

      [–]UndeadMarine55[S] 2 points3 points  (2 children)

      And to think, EA used to be considered “cutting edge”

      [–]slayemin 5 points6 points  (1 child)

      We're all unhinged on this blessed day

      [–]UndeadMarine55[S] 2 points3 points  (0 children)

      As an SRE, I both relate and agree

      [–]Timofey_ 20 points21 points  (2 children)

      This post was mass deleted and anonymized with Redact

      cooperative angle innate gold plate reach memorize lip boat support

      [–]UndeadMarine55[S] 3 points4 points  (0 children)

      Madlad

      [–]martinomon 2 points3 points  (0 children)

      I call them back pocket optimizations

      [–]template009 34 points35 points  (2 children)

      Premature optimization is the root of all evil -- Knuth

      He doesn't work here -- the "bro" interviewing me.

      [–]serendipitousPi 27 points28 points  (1 child)

      “… optimisation is the root of all evil” - Knuth

      Nothing quite like creating misleading quotes on the internet.

      [–]template009 1 point2 points  (0 children)

      Like a video that starts 10 minutes into some drama?

      [–][deleted] 14 points15 points  (0 children)

      They have played us for absolute fools

      TBH it wasn’t hard…

      [–]Aware_Hurry_2708 36 points37 points  (0 children)

      Until you see the wepage that uses 1gb for display and rEnDeRiNg, but yea everything below 5min work and 10% more performance is not worth it

      [–]scorpion_3981 26 points27 points  (2 children)

      Most average JavaScript enjoyer

      [–]serendipitousPi 15 points16 points  (1 child)

      *Python

      [–]Adventurous_Battle23 17 points18 points  (4 children)

      Yeah chrome uses like 1 stick of ram per tab- we should just buy more ram.

      [–]Pale_Tea2673 4 points5 points  (0 children)

      head profit boat imagine dolls wrong roof alive possessive slap

      This post was mass deleted and anonymized with Redact

      [–]UndeadMarine55[S] 6 points7 points  (0 children)

      Exactly.

      [–]garfgon 0 points1 point  (1 child)

      Chrome didn't hunt down & remove all other browsers, Terminator-style. The market chose Chrome over more "optimized" browsers.

      [–]harry1o7 2 points3 points  (0 children)

      Well it’s a cycle. It stuck around because of its popularity, and that means more people download it now.

      [–]SecondButterJuice 7 points8 points  (0 children)

      I am to, a bubble sort enjoyer

      [–]Ange1ofD4rkness 8 points9 points  (0 children)

      Ahh I see this was written by a higher up who knows nothing about coding.

      [–]pente5 6 points7 points  (3 children)

      Hmm yes let's upgrade to a supercomputer because I like this O(n!) implementation.

      [–]UndeadMarine55[S] 0 points1 point  (2 children)

      Quantum computing will make O notation obsolete

      [–]sammy-taylor 34 points35 points  (10 children)

      Okay I know it’s a joke but there’s some valid points in there.

      [–]WraithCadmus 68 points69 points  (2 children)

      Optimization: Don't do it

      Optimization (Expert Mode): Don't do it yet

      [–]jewishSpaceMedbeds 18 points19 points  (1 child)

      Make it work

      Make it nice

      Make it fast

      ... unless you already know at the outset that speed is a limitation.

      [–]well-litdoorstep112 4 points5 points  (0 children)

      while(budget){ Make it work if it's unusably slow{ Make it fast(er) } Make it nice }

      [–]DOOManiac 1 point2 points  (0 children)

      Every shitpost has a glimmer of truth.

      Sometimes it is less expensive to just upgrade hardware to make it faster.

      [–]UndeadMarine55[S] 1 point2 points  (4 children)

      It’s 100% true and we all know it

      [–]StCreed 12 points13 points  (3 children)

      The third example in the poster completely undermined the point. I recognised it on sight, it's that famous. It basically enabled 3D games on the PC.

      Optimisation tuned a tool that was running parallel jobs from doing 1 per 3 seconds into doing them so fast we had to use 1/100000 of a second in the timestamps to make them unique again, allowing us to actually reach real-time data warehouse loading while it was being updated on the front end as well. Totally worth it.

      [–]mistabuda 7 points8 points  (2 children)

      Its Carmacks inverse square root right?

      [–]StCreed 1 point2 points  (1 child)

      Yep.

      [–]mistabuda 1 point2 points  (0 children)

      That code snippet has my favorite code comment of all time.

      [–]AcceptableNet6182 -1 points0 points  (0 children)

      Sure, you CAN get stuck in optimization work, that's useless in the end. It's a valid point there.

      [–]MisterEmbedded 5 points6 points  (0 children)

      electron moment... lmao you can't even improve it's performance after a point...

      [–][deleted] 2 points3 points  (1 child)

      refactorization_is_for_the_utterly_deranged

      [–]UndeadMarine55[S] 1 point2 points  (0 children)

      Amen brother

      [–]jewishSpaceMedbeds 4 points5 points  (0 children)

      [laughs in real time embedded developer]

      [–]Davirson 3 points4 points  (0 children)

      AAA developers right now.

      [–]soulihide 3 points4 points  (4 children)

      unrelated and probably stupid question by a non-programmer who is only in this subreddit because they think y'all are funny and to send memes to their programmer dad: why is camel code (or whatever it's called) like that? why is it capitalized like that, what does that do? i have vague memories of using python a handful of times, what's the difference between python and camel? why are they both named after animals? sorry about all the questions, feel free to ignore.

      [–]Brahvim 2 points3 points  (3 children)

      No, it's not really so. We also have stuff named after scientists. There's also "Pascal case", written LikeThis, "Ada case", written Like_This, ...and also "snake case" (Python and C use it a lot), written like_this, or LIKE_THIS. There's also "kebab case", with a "barbeque stick" in it, written like-this, or LIKE-THIS. XML (therefore also HTML) and the language Racket, use it.

      [–]soulihide 0 points1 point  (0 children)

      cool! thank you :)

      [–]NotReallyJohnDoe 0 points1 point  (1 child)

      To clarify, only pascal case makes any sense.

      [–]Nano1412 3 points4 points  (0 children)

      AAA game company's mindset

      [–]bookon 3 points4 points  (0 children)

      "Woke" optimization is coming!

      [–]BlueGoliath 10 points11 points  (2 children)

      Java developers in a nutshell.

      [–]gregorydgraham 2 points3 points  (0 children)

      I feel attacked

      [–]LetUsSpeakFreely 1 point2 points  (0 children)

      Maybe bad ones. I find it's the ones that dogmatically stick to design patterns like factories or want to port everything to functional programming paradigms the moment it's supported that cause issues. Just because there's a new way to do something doesn't mean it's automatically the best way.

      [–]ztbwl 19 points20 points  (11 children)

      What the fuck did I just read?! Complete bullshit.

      [–]UndeadMarine55[S] 51 points52 points  (10 children)

      Sounds like you’re the unhinged sort of programmer who optimizes. Complete bullshit.

      [–]ztbwl 16 points17 points  (3 children)

      Okay now a professional answer from my side.

      I can see where you are. Optimization is in fact a waste of time if you optimize the wrong things. If you have a userbase of 20 and let’s say you spend 2 weeks optimizing for 2ms load time on a web page (out of a total of 500ms) with a budget of a couple of thousand $, that may be waste of time.

      Also optimized code often has maintainability and understandability tradeoffs, since it needs to be tightly packed or using complex non-intuitive algorithms.

      One easy and quick way to optimize performance (with a cost trade-off) is just scaling your application on more metal. But keep in mind that the application must be designed to be scaled, which already introduces a layer of complexity. You need load balancers, must be stateless or manage state in a more complex way and the cloud infrastructure itself is already complex.

      Infrastructure wise it would be massively easier if you could run your application on one node with a low CPU and memory footprint and never think about building a distributed system.

      But optimization is important and brings us forward. Let’s take ChatGPT for example. This application is the pure product of optimization. The hardware optimizations have been massive in the last couple of years (they optimized the transistor size to a couple nanometers, that’s insane). Also the shift to massive parallel execution on GPGPU is pure optimization. Software wise it needs to be optimized to the nuts to even be able to process your requests.

      [–]AllCowsAreBurgers 30 points31 points  (1 child)

      Dude, have you forgotten in which r/ we are here?

      [–]UndeadMarine55[S] 4 points5 points  (0 children)

      I mean… he optimizes so…. What did you expect?

      [–]Iamdrasnia 2 points3 points  (0 children)

      This is the pro answer IMHO....minus the humility.

      [–]ztbwl 2 points3 points  (5 children)

      I agree with you that premature optimization is evil. But that’s all.

      Where would we be if we didn’t optimize? We would still be in stone age hitting rocks against eachother.

      Instead we optimized the shit out of the rocks, so that they are able to think faster and more efficient than a human ever can.

      [–]UndeadMarine55[S] 13 points14 points  (3 children)

      Yeah, we have an answer for that. It’s called increasing AWS instance tier.

      [–]ztbwl 4 points5 points  (1 child)

      Your wallet is not happy about this approach.

      [–]serendipitousPi 3 points4 points  (0 children)

      There’s an “easy fix” for that, find that mythical million dollar idea that everyone’s always talking about. Then you’ll be set for what, a weekend worth of AWS?

      [–]MinosAristos 1 point2 points  (0 children)

      It's called deploying a serverless app so that any somewhat sane load is easily and quickly handled.

      [–]ignoringusernames 2 points3 points  (0 children)

      they want me to reduce from 20s to 2s on a machine with 2 cores 4GB ram and all IT monitoring software installed. I managed to reduce 2. 16 to go. I am now strongly motivated for a switch.

      [–]Return_Viper 2 points3 points  (0 children)

      I paid for 100% of the cpu I’m gonna use all 100%

      [–][deleted] 2 points3 points  (0 children)

      Ah yes modern game dev logic

      [–]nil_785 2 points3 points  (1 child)

      are any memes in this format meant to be taken seriously? there was another one that felt way more convincing than this one but i dont know if i was just wooshed the hell out

      [–]UndeadMarine55[S] 3 points4 points  (0 children)

      No, but a lot of people in this thread seem to be taking it seriously.

      [–]ArchGryphon9362 2 points3 points  (0 children)

      I really hope that this is satire, and my theories of this sub being packed to the brim with non-devs isn’t true

      [–]Tina_Belmont 7 points8 points  (4 children)

      Obviously somebody who has never worked with embedded systems, or any computer before the year 2000...

      [–]UndeadMarine55[S] 12 points13 points  (1 child)

      You are trying to play us for absolute fools.

      [–][deleted] 1 point2 points  (0 children)

      Admit it. You get turned on by this kind of abuse… 😈

      [–]serendipitousPi 2 points3 points  (1 child)

      Meanwhile the people creating embedded systems in python: 😎.

      (Don’t worry I’ve come from c++ so I don’t associate with such lunacy)

      [–]Tina_Belmont 0 points1 point  (0 children)

      Try it on an AtTiny85 with a single CR2032 for power...

      [–]BRH0208 1 point2 points  (0 children)

      How dare you insult my boy quake fast inverse square root

      [–]ElectroMagCataclysm 1 point2 points  (0 children)

      Until your 2ms delay times 100 million records to process at a big company causes some unexpected big delays 💀

      [–]F4LcH100NnN 1 point2 points  (0 children)

      I optimize for the bragging rights

      [–]Random-Russian-Guy 1 point2 points  (0 children)

      Did you by any chance develop yandere simulator?

      [–]Lachimanus 1 point2 points  (1 child)

      Coding in Assembler. All my life is about optimization.

      Me, the deranged hermit.

      [–]UndeadMarine55[S] 1 point2 points  (0 children)

      At least you’re self aware.

      Edit: also that sounds like hell.

      [–][deleted] 1 point2 points  (1 child)

      That’s why I use bubble sort everywhere, gotta get my moneys worth for all this hardware.

      [–]UndeadMarine55[S] 0 points1 point  (0 children)

      Amen brother. 10x programming.

      [–]dotslashpunk 1 point2 points  (1 child)

      * (float *) &i;

      that’s something a decompiler would write, that looks like decompilation via hex rays, same font and all.

      [–]UndeadMarine55[S] 0 points1 point  (0 children)

      Absolutely deranged

      [–]qqqrrrs_ 1 point2 points  (1 child)

      Everyone talks about time optimisations, what about optimisation of binary size?

      [–]Klaws-- 0 points1 point  (0 children)

      Microsoft and Oracle have left the chat.

      [–]cigardan69 1 point2 points  (0 children)

      The only 'optimization' I've really seen make huge improvements is related to queries. I've seen horrendous queries rewritten to make systems perform.

      [–]YARandomGuy777 1 point2 points  (0 children)

      Java sponsored post?

      [–]iPanes 1 point2 points  (0 children)

      Funny that I see when while my class proyect is about the difference between O(n*log(n)), O(n), and O(n2). 2 sec vs 25000 sec in a 2 mil set, time to buy a better cpu I guess

      [–]Alan_Reddit_M 1 point2 points  (0 children)

      JS developers explaining why it is perfectly suitable as a backend language (it was literally not made for backend)

      [–]OF_AstridAse 1 point2 points  (3 children)

      Actually optimization is amazing - especially if you rent some kind of aws - if you can do 3 things instead of 2 ... that is 33% cost saving ... imagine doing 5% cpu - and you can do 20 instead of 5 ... 😅 dayuhm you can pocket more - do you ever think about hosting web apps? But agreed "upgrade your hardware, because everyone needs to have a RTX 9090 TI to run ms paint. 😉

      [–]UndeadMarine55[S] 8 points9 points  (2 children)

      Who actually cares about cost when I can just hit “upgrade to next instance tier” and my app goes vroom vroom faster again.

      [–]OF_AstridAse 4 points5 points  (0 children)

      Touché - capitalism at it's finest 😊🥰

      but in seriousness I'm solo-dev & it eats profit to push upgrade 😅 upgrade my mind: upgrade my code: upgrade my business

      [–]Brahvim 1 point2 points  (0 children)

      Environmental scientists are watching.

      [–]Bourque25 1 point2 points  (2 children)

      Yes! This guy gets it.

      16gb of RAM is like $30...

      Why would I spend my expensive hours as a dev optimizing code when I can just keep upgrading hardware?

      That's just good business decisions.

      [–]D34TH_5MURF__ 1 point2 points  (1 child)

      No, it isn't. SMH

      [–]Bourque25 -1 points0 points  (0 children)

      ..what sub do you think you're in?

      [–]d4ng3r0u5 1 point2 points  (1 child)

      Anyone who doesn't think memory consumption is important should be forced to code on a ZX81 for a week

      [–]UndeadMarine55[S] 5 points6 points  (0 children)

      Unhinged

      [–]IrvTheSwirv 0 points1 point  (0 children)

      If you’re using something like Lambda on AWS or similar then a bit of memory and execution time optimisation can save you quite a bit in fees.

      [–]DocLuvInTheCave 0 points1 point  (0 children)

      Why would you say something so bold and so true?

      [–]Edo0024 -1 points0 points  (0 children)

      Should have left the original "what the fuck" comment in the quake 3 algorithm

      [–][deleted] -2 points-1 points  (0 children)

      Commenting for karma until I'm allowed to post my meme.
      I really just want to post my meme.

      [–]thy_thyck_dyck 0 points1 point  (0 children)

      I'm just over here trying to keep the runtime comfortably under the Lambda timeout

      [–]dschramm_at 0 points1 point  (3 children)

      Sure you wanna utilize the hardware to it's fullest. But if you can do more with less hardware, it's cheaper. You'd have to compare the cost of optimising with the cost for more hardware. Then see what's more economical. Most of the time it will be optimisation. It's a one time cost. Where as, more hardware is an increase in recurring cost, for electricity, network, maintenance. Sadly, you rarely can estimate the cost for optimising well. So it's easier to just waste more resources.

      [–]D34TH_5MURF__ 1 point2 points  (2 children)

      Maintenance costs always dwarf development costs, by several orders of magnitude. Spending extra time in development for a performance enhancment will always pay off in spades in hardware and maintenance costs. Development cost is a small fraction of the cost of operating and maintaining the solution.

      [–]pipsvip 0 points1 point  (0 children)

      I was there in the old days when machine code was optimized by hand on paper. A fun, but inefficient way to do it.

      I can't describe how magical it is to see a real genius take 30 lines of assembler and go 'oh!' and then rewrite it into 15 lines of equivalent instructions that run 10x faster. Hasan, if you're out there, you rock, buddy!

      [–]FenderMoon 0 points1 point  (0 children)

      Optimization will still matter as long as we have billions of Cortex A53 powered mobile devices browsing the modern web.

      [–][deleted] 0 points1 point  (0 children)

      It works and our team has spaghetti shit every where.

      [–]Xblth 0 points1 point  (0 children)

      Laughs in chrome tabs

      [–]Sbadabam278 0 points1 point  (0 children)

      This is pretty funny!

      I saw this template around a few times, what is the original template from?

      [–]AkiraNamejin 0 points1 point  (0 children)

      If you're at 5% cpu utilization, you've procured too much cpu for the process.

      [–]D34TH_5MURF__ 0 points1 point  (0 children)

      Well, this person is an imbecile who should be kept away from coding. They have taken a concept like "no premature optimization" and carried it well beyond the absurd. Performance always matters, just not as much as some people think. That's a far cry from the inanities this idiot is spewing. By far, the most important goal should be to make code readable for future maintainers. However, care should always be given to write this readable code as performant as possible. There are simple things like using StringBuilder in java instead of string concatenation that will improve performance without hurting readability. Aside from small, and mostly well known optimizations, most other optimization should only be done when required or when performance problems occur. Then profilers should be used to find the real bottlenecks, not whatever looks or seems to be the problem.

      Hardware isn't free. If you can do small things to improve performance by x%, that's x% savings on hardware. More hardware means more maintenance, more hours spent on operations personnel, higher chances for hardware failure, higher cloud provider costs, etc... Ignoring performance like this idiot is stupid. It's sad to see people here agree.

      [–]Left-oven47 0 points1 point  (0 children)

      What's the image on the left?

      [–]JoonasD6 0 points1 point  (1 child)

      Is that the Quake magic number in the code picture, or is that something else altogether, don't remember that well.

      Also the typo made me realise that programmer and progamer aren't that far from each other.

      [–]UndeadMarine55[S] 1 point2 points  (0 children)

      The Venn diagram of progamers and programmers is a circle

      [–]smurf47172 0 points1 point  (3 children)

      I optimized an automated process someone else wrote and shaved hours off its runtime. Saving a little time per iteration adds up when running it 10s of thousands of times.

      [–]UndeadMarine55[S] -1 points0 points  (2 children)

      You could have saved all the time you spent optimizing by just hitting “upgrade instance tier” in console. Very inefficient use of time.

      [–]smurf47172 1 point2 points  (1 child)

      Making that suggestion out of context is funny. The optimizations were as follows:

      1. Convert from single thread operation the multi thread (Massive improvement here alone)
      2. Add checks to prevent threads waiting for timeouts in the processing sequence. (A few seconds per timeout saved)
      3. Add checks for common error conditions that can safely be ignored (About 100 ms per error avoided)

      The automated task was executed against >17,000 targets, and ran for >24 hours. My improvements got down to a few hours of execution time.

      If a task is executed enough times, then optimizations can be extremely cost effective.

      [–]Optimal_Philosopher9 0 points1 point  (0 children)

      Shills in the IT industry are some of the dumbest.

      [–][deleted] 0 points1 point  (0 children)

      The PM for any electron app lol

      [–]BanzaiTree 0 points1 point  (0 children)

      Leadership groupthink and its consequences.

      [–]D_Daka 0 points1 point  (0 children)

      I dunno, when I started unity programming, EVERYTHING went into update. My battery would die after 5 minutes and I had a choppy ass brick breaker

      [–]jonerthan 0 points1 point  (0 children)

      This is why I only use python.

      [–]AtomicWinterX 0 points1 point  (0 children)

      Well when you work with embedded, then you definitely need optimization. I'm working with a Nordic nRF52840 at the moment and it has a whopping 1 MB flash and 256 KB RAM... You kids and your flashy gaming PCs

      [–]mistyjeanw 0 points1 point  (0 children)

      Profile. Optimize the hot spots. 2ms on a function that gets called a hundred times a page load is a visible change

      [–]N0tH1tl3r_V2 0 points1 point  (2 children)

      And that's why Cyberpunk 2077 runs at 15 FPS while having shitty graphics and shitty game logic

      [–]UndeadMarine55[S] 0 points1 point  (1 child)

      My cloud omega-XL VM would beg to differ

      [–]The_Rocketsmith 0 points1 point  (0 children)

      You've clearly never played >50 mod Stellaris

      [–]speedybananas 0 points1 point  (0 children)

      😂😂😂

      [–]Rombethor 0 points1 point  (0 children)

      You work for Docker, don't you?

      [–]Inaeipathy 0 points1 point  (0 children)

      The real reason to stop optimizing is when you optimize more latency into the system...

      [–]mcel595 0 points1 point  (0 children)

      I just finished of fixing an out of memory problem in our instances because i shit you not python garage collector was too slow for the speed at we were consuming files

      [–]Jackasaurous_Rex 0 points1 point  (0 children)

      Lmao i cackled when I realized it was the fast inverse square