Mobile software engineer.

  • 20 Posts
  • 97 Comments
Joined 1 year ago
cake
Cake day: June 17th, 2023

help-circle

  • This is the right answer. To complement it, I’d just say I’ve read someone before say that at Microsoft there’s no incentive to squeeze performance, so why bother if it won’t help you get promoted or get a bonus? All these things add up over time to make Windows only care about it when there is actually a huge bottleneck.

    It’s also worth noting (for non programmers out there) that speed has no correlation with the amount of code. Often it’s actually the opposite: things start simple and begin to grow in complexity and amount of code exactly to squeeze more optimizations for specific use-cases.








  • You’re right that garbage collection makes Go simpler, and maybe other patterns do contribute to prevent complexity from piling up. I never worked with Go outside of silly examples to try it out, so I’m no authority about it.

    What I meant was more of a “general” rule that the simpler a language is, the more code is necessary to express the same thing and then the intent can become nebulous, or the person reading might miss something. Besides, when the language doesn’t offer feature X, it becomes the programmer’s job to manage it, and it creates an extra mental load that can add pesky bugs (ex: managing null safety with extra checks, tracking pointers and bounds checking in C and so on…).

    Also there are studies that show the number of bugs in a software correlate with lines of code, which can mean the software is simply doing more, but also that the more characters you have to read and write, the higher the chance of something to go wrong.

    But yeah, this subject depends on too many variables and some may outweigh others.









  • The mental model I have about performance is that the higher abstraction usually beats the lower level abstraction.

    So in that sense, a well architected software with proper caching, multithreading where it matters etc. will beat badly architected software (ex: one that brute forces everything). Then, that being equal, good algorithms and solutions beat bad ones. Only then faster runtimes make more of a difference, and at the bottom things like more efficient processor architectures, more efficient compiler etc. beat slower ones.

    A good example is Lemmy itself, which as far as I know was made in Rust to be super fast, but then at the beginning was being DDOSed quite easily because of the way the database was designed and lots of queries were very slow. Once they fixed that, Lemmy became actually usable.