Spending short lifetime for development and boring things.

$argon2id$v=19$m=512,t=256,p=1$J7IZNfNG3RC2FiSRzZfQzw$0seu3KTpAnSufFxXDbHccXnX81enF+A++beI9VvHVVA

  • 8 Posts
  • 22 Comments
Joined 11 months ago
cake
Cake day: August 11th, 2023

help-circle


















  • Kind of destiny 🤦🏻‍♂️

    I started programming when I was in primary school. And I liked it very much, even though I didn’t understand much even then. But it was impossible to stop and here I am writing this after about 30+ years.

    What exactly attracted me - my father soldered a Russian clone of the Sinclair ZX Spectrum, showed me a couple of games loaded from a tape cassette, and I was curious how it works.


  • More than ten years ago, I was a team-lead in a game development company and during another crunch I was very overloaded with tasks, including a code review. And of course, I missed some things. We optimized the game, which in general did not do 30 fps on the target machine with minimum requirements, and the target was at least 40 fps. During the month, we jointly optimized everything so that we were able to achieve almost stable 40 frames, but this was not enough and periodically there were drawdowns up to 15-20 fps. Everyone is in panic, there are no ideas, we’re optimized everything.

    No, I understand that there is no optimization limit apriori, but I mean an adequate opts without rewriting everything to assembler specifically for all supported architectures.

    So, one night I looked into the event loop initialization and found that the initialization happens twice. Twice. Two parallel event loops. That is, two parallel cycles of logic and state updates. That night, by deleting one line, I optimized the performance of the game by more than 100%. 🤦🏻‍♂️

    I investigated and found out that this line of secondary initialization was left by junior “for debugging” and forgotten in the crunch. And I missed it on the review.

    I’ve keep this story a secret all these years. And now I’m not revealing names. Otherwise, it can have a dramatic impact on the careers of many.