×
Login Register an account
Top Submissions Explore Upgoat Search Random Subverse Random Post Colorize! Site Rules
6

Why is modern software so slow? -> "Clean" Code, Horrible Performance [22:40] - Molly Rocket

submitted by Love240 to programming 10 monthsJun 23, 2023 01:02:20 ago (+6/-0)     (www.yewtu.be)

https://www.yewtu.be/watch?v=tD5NrevFtbU

"Clean" Code principles shown in their own examples to produce losses of 15x the speed of computation time.


15 comments block


[ - ] oyveyo 2 points 10 monthsJun 23, 2023 05:33:30 ago (+2/-0)

Speed aside, let's talk about storage/memory size. Every fucking piece of software these days takes 70 fucking gigs of space up. Why? Because lazy motherfuckers use one or two resources from pre-written library and they leave ALL of the pre-written library in place so they don't have to prune for efficiency.

I saw someone's Xbox updating a video game the other day, and my jaw dropped in disbelief when I saw the update was 170 gigs. Are you fucking kidding me? That's 8,500 IBM PC's.

[ - ] PotatoWhisperer2 2 points 10 monthsJun 23, 2023 01:51:21 ago (+2/-0)

And you have to wonder just how much of the slowdown is from diversity hires copying stack exchange for their enterprise software, and/or the various backdoor programs/algos working in the background to watch/record everything you do.

Not to mention intentional slowdowns for various reasons that then get mindlessly copied endlessly by dot niggers.

[ - ] Glowbright 1 point 10 monthsJun 23, 2023 12:05:01 ago (+1/-0)

While I don't doubt that there is some validity to this, but this is really not why modern code is slow.

Story time:
About 20 years ago I was working as a Software Developer and as my company were part of the Microsoft partner's network we received free tickets to a 2-day workshop on there brand new thing that they said would change software development forever... They were calling it ".NET". So one of my coworkers and I traveled to this event and spent 3 days in a conference hall with 20 other developers from around the country and they gave us a crash course in .NET application development.

As a developer my thoughts on .NET were mixed. It was SUPER easy to use. Nearly everything could be done dragging and dropping objects and modifying parameters in the UI. It was easy... This was Microsoft making software development accessible to people who were not really software developers. Front-end UI engineer could suddenly be productive on the back end. A script kiddie could suddenly make a real application.

And it preformed like shit. I made a hello world app that was a single .NET form with a few text labels and a text field that populated with the string "Hello World!" and when I ran it it took 20MB of memory. Even in the early '00s that was not a lot of memory, but this app was doing literally nothing. It was clear that the .NET framework was an absolute performance pig.

Several of us challenged the Microsoft instructors on this. Their response? "Yeah we know it performs poorly compared to nice tight hand-written code... This is the price you pay for making it so easy to develop in the framework. And we have decided that performance is literally our last concern. Every year CPUs double in speed. Our philosophy is that we are writing the development tools for the next 10 years. What looks like a 'performance hog' today will be just a drop in the bucket tomorrow."

So there you have it folks. Microsoft lead the way but the entire industry followed. Modern software performs so slowly because software developers stopped caring once computers became fast. Software developers prioritized things that make their lives easier.

[ - ] ilikeskittles 1 point 10 monthsJun 23, 2023 11:11:40 ago (+1/-0)

It’s because most programmers cannot program.

[ - ] bonghits4jeebus 1 point 10 monthsJun 23, 2023 04:32:43 ago (+1/-0)

Yeah well when you go to optimize you make it more complicated and manage resources more carefully. I think a lot of the issue is just that people never get there. They're always making the latest widget work, and CPUs are always coming up with more cycles to waste.

[ - ] Trollasaurus 1 point 10 monthsJun 23, 2023 04:26:08 ago (+1/-0)

There are videos that explain this better in less time. The answer is bloated coding. This shit got bad because of increases in readily available storage. There's no reason to code efficiently and save space on storage devices anymore. If you look to the past, C, the most efficient coding language, was invented to save space and as a result made coding super efficient. If you compare it to languages that are used today which are largely object oriented, it becomes a mess. It gets even worse when you realize most "coders" these days actually just use frameworks to do half the work for them. Which stacks bloat and inefficient coding on top of bloat and inefficient coding.

[ - ] SithEmpire 1 point 10 monthsJun 23, 2023 03:06:33 ago (+1/-0)

An interesting comparison study here is SQLite, where any connector/driver has to implement the entire SQLite engine.

Naturally there are some major performance differences depending on platform and query used. Trying to use a Group By when you have a bunch of CTEs (the With clause) and over 9000 Joins can take a full minute with some production implementations, but half a second with the official non-production CLI.

[ - ] Master_Foo 1 point 10 monthsJun 23, 2023 01:05:16 ago (+1/-0)

The difference in time between a cache hit and a ram hit is x30.
If you don't know how to optimize your pages, then go hang yourself, faggot!

[ - ] Prairie 0 points 10 monthsJun 23, 2023 02:15:59 ago (+0/-0)

He's idiotic, though. Most code doesn't matter for performance. Time is spent in loops. What matters more is having a clear picture of the system and being able to configure it to not do unnecessary things. Might as well suggest writing everything in assembler. Except that will make the code slower because you lose flexibility and clarity in the sea of details.

But I think the real bloat and slowness comes from outside, having to use overly-general frameworks to interoperate with other software. These dictate the form of things and have so many layers in each one it's mind-numbing. Feature-creep is everywhere.

[ - ] Love240 [op] 0 points 10 monthsJun 23, 2023 02:22:28 ago (+0/-0)

The kind of performance difference that he's demonstrating (up to 23x) based on simple changes is showing that it really may matter a lot more than we thought. And this was using THEIR example of 'Clean' Code too!

[ - ] Robhere 0 points 10 monthsJun 23, 2023 02:05:04 ago (+0/-0)

there is no clean code.

[ - ] lolxd 0 points 10 monthsJun 23, 2023 01:22:06 ago (+0/-0)

Necessity is the father of invention.

Creating code that actually does anything efficiently is moot when your average idiot buys a 32 core processor because they need GoyFlix to run along with 300 other apps for shit they never use.

[ - ] Master_Foo 2 points 10 monthsJun 23, 2023 01:27:39 ago (+2/-0)

This is probably more aligned with people concerned with server farm performance.
I used to build instances for load balancing.
Shitty code starts to cut into margins when you have to fire up 300 instances.
A few well tuned modules can cut that overhead down to 10 instances.

[ - ] Prairie 1 point 10 monthsJun 23, 2023 02:17:14 ago (+1/-0)

A few well tuned modules

Exactly. Things like he describes in video will make a big difference if you do it where it matters in the system.

[ - ] lolxd 1 point 10 monthsJun 23, 2023 11:40:46 ago (+1/-0)

The problem is nobody really builds "big" till they have to, they rent it, and when it needs more performance, they just spend more money.