this post was submitted on 18 Nov 2023
87 points (96.8% liked)
Programming
17484 readers
130 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It leads to software obesity and is a real thing. I think it has to do with developer machines being beefy, so if you write something that runs on it and don't have a shit machine to test it on, you don't know just how badly it actually performs.
But it also has to do with programming languages. It's much much easier to prototype in Python or Javascript and often the prototype becomes the real thing. Who really has time (and/or money) to rewrite their now functional program in a language that is performant?
IMO there doesn't seem to be a clear solution.
I don't think that even the languages are the problem, it's the toolchain. While certainly if you went back to C or whatever, you can design more performant systems, I think the problem overall stems from modern toolchains being kinda ridiculous. It is entirely common in any language to load in massive libraries that suck up 100's of mb of RAM (if not gigs) to get a slightly nicer function to lowercase text or something.
The other confounding factor is "write once, run anywhere" which in practice means that there is a lot of shared code and such that does nothing on your machine. The most obvious example being Electron. Pretty much all of the Electron apps I use on the reg (which are mostly just Discord and slack) are conceptually simple apps that have analogues that used to run on a few hundred mbs of storage and 10's of mb of RAM.
Oh, one other sidetone - how many CPUs are wasting cycles on things that no one wants, like extremely complex ad-tracking/data mining/etc.
I know why this is the case, and ease of development does enable us to have software that we probably otherwise wouldn't, but this is a thing that I think is a real blight on modern computing, and I think it's solvable. I mean, probably the dumbest idea, but improving translation layers to run platform-native code can be vastly improved. Especially in a world where we have generative AI, there has to be a way to say "hey, I've got this javascript function, I need this to work in kotlin, swift, c++, etc."
LLVM will save us.
Maybe...
LLVM is ironically a very slow compiler back-end, whose popularity has contributed to a general slow-down in compilation speed across the whole industry (it's even slow at doing debug builds for fast iteration).
WASM has some promise though
Doesn't really matter if the compiler is slow if the result is optimized and fast 🤷 Rust compiles slower than C, but that's because C has no safeguards (excluding static typing). Very often the wasted CPU cycles are on the end of the user, not the developer.