6 ms·
There's tons of backlash here as if people think better performance requires writing in assembly. But to anyone complaining, I want to know, when was the last
by godelski 1y ago
There's tons of backlash here as if people think better performance requires writing in assembly.
But to anyone complaining, I want to know, when was the last you pulled out a profiler? When was the last time you saw anyone use a profiler?
People asking for performance aren't pissed you didn't write Microsoft Word in assembly we're pissed it takes 10 seconds to open a fucking text editor.
I literally timed it on my M2 Air. 8s to open and another 1s to get a blank document. Meanwhile it took (neo)vim 0.1s and it's so fast I can't click my stopwatch fast enough to properly time it. And I'm not going to bother checking because the race isn't even close.
I'm (we're) not pissed that the code isn't optional, I'm pissed because it's slower than dialup. So take that Knuth quote you love about optimization and do what he actually suggested. Grab a fucking profiler, it is more important than your Big O
- nwallin 1y agoAnother datapoint that supports your argument is the Grand Theft Auto Online (GTAO) thing a few months ago.[0] GTAO took 5-15 minutes to start up. Like you click the icon and 5-15 minutes later you're in the main menu. Everyone was complaining about it for years. Years. Eventually some enterprising hacker disassembled the binary and profiled it. 95% of the runtime was in `strlen()` calls. Not only was that where all the time was spent, but it was all spent `strlen()`ing the exact same ~10MB resource string. They knew exactly how large the string was because they allocated memory for it, and then read the file off the disk into that memory. Then they were tokenizing it in a loop. But their tokenization routine didn't track how big the string was, or where the end of it was, so for each token it popped off the beginning, it had to `strlen()` the entire resource file. The enterprising hacker then wrote a simple binary patch that reduced the startup time from 5-10 minutes to like 15 seconds or something. To me that's profound. It implies that not only was management not concerned about the start up time, but none of the developers of the project ever used a profiler. You could just glance at a flamegraph of it, see that it was a single enormous plateau of a function that should honestly be pretty fast, and anyone with an ounce of curiousity would be like, ".........wait a minute, that's weird." And then the bug would be fixed in less time than it would take to convince management that it was worth prioritizing. It disturbs me to think that this is the kind of world we live in. Where people lack such basic curiosity. The problem wasn't that optimization was hard, (optimization can be extremely hard) it was just because nobody gave a shit and nobody was even remotely curious about bad performance. They just accepted bad performance as if that's just the way the world is. [0] Oh god it was 4 years ago: https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times-by-70/ https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times...
- godelski 1y agoI just started getting back into gaming and I'm seeing shit like this all the time. It's amazing that stuff like this is so common while the Quake fast inverse square root algo is so well known. How is it that these companies spend millions of dollars to develop games and yet modders are making patches in a few hours fixing bugs that never get merged. Not some indie game, but AAA rated games! I think you're right, it's on both management and the programmers. Management only knows how to rush but not what to rush. The programmers fall for the trap (afraid to push back) and never pull up a profiler. Maybe over worked and over stressed but those problems never get solved if no one speaks up and everyone is quiet and buys into the rush for rushing's sake mentality. It's amazing how many problems could be avoided by pulling up a profiler or analysis tool (like Valgrind). It's amazing how many millions of dollars are lost because no one ever used a profiler or analysis tool. I'll never understand how their love for money makes them waste so much of it.
- bigstrat2003 1y agoAAA games are, largely, quite bad in quality these days. Unfortunately, the desire to make a quality product (from the people who actually make the games) is overruled by the desire to maximize profit (from the people who pay their salaries). Indie games are still great, but I barely even bother to glance at AAA stuff any more.
- godelski 1y ago> by the desire to An appropriate choice of words. I'm just wondering if/when anyone will realize that often desire gets in the way of achieving. ̶T̶h̶e̶y̶ ̶m̶a̶y̶ ̶b̶e̶ ̶p̶e̶n̶n̶y̶ ̶w̶i̶s̶e̶ ̶b̶u̶t̶ ̶t̶h̶e̶y̶'̶r̶e̶ ̶p̶o̶u̶n̶d̶ ̶f̶o̶o̶l̶i̶s̶h̶.̶ Chasing pennies with dollars
- pjmlp 1y agoThat has been like that since there have been publishers in the games industry. Back then, the indies stuff was only if you happened to live nearby someone you knew doing bedroom coding, distributing tapes on school, or they got lucky land their game on one of those shareware tapes collection. Trying to actually get a publisher deal was really painful, and if you did, they really wanted their money back in sales.
- 1vuio0pswjnm7 1y ago"I literally timed it on my M2 Air." I bet it opens faster on a Surface Pro
- deleted 1y ago[deleted]
- justsid 1y agoIt does not. In fact, it crashes roughly every 4th or so startup.
- 1vuio0pswjnm7 1y agoYikes. I'm glad I do not use Windows anymore
- godelski 1y agoI mean we're talking about a fucking text editor here. A second to load is a long time even if it was on an intel i3 from 10 years ago. Because... it is a text editor... Plugins and all the fancy stuff is nice, but those can be loaded asynchronously and do not need to prevent you from jumping into a blank document. But the god damn program is over 2GB in size... like what the fuck... There's no reason for an app I open a few times a year and have zero plugins and ONLY does text editing should even be a gig. Seriously, get some context before you act high and mighty. I don't know how anyone can look at Word and think it is anything but the accumulation of bloat and tech debt piling up. With decades of "it's good enough" compounding and shifting the bar lower as time goes on.
- versteegen 1y agoAs a long time emacs user, all of that criticism hits uncomfortably close to home, much as I would like to diss Word...
- sintax 1y agoTry doom emacs, that loads super fast.
- AdieuToLogic 1y ago> People asking for performance aren't pissed you didn't write Microsoft Word in assembly we're pissed it takes 10 seconds to open a fucking text editor. It could be worse I suppose... Some versions of Microsoft Excel had a flight simulator embedded in them[0]! :-D 0 - https://web.archive.org/web/20210326220319/https://eeggs.com/items/29841.html https://web.archive.org/web/20210326220319/https://eeggs.com...
- saagarjha 1y agoYour computer is broken. My M1 Pro launches it to user interactive in less than two seconds. And, to be clear, I launched it in a profiler. I suggest you do the same on your machine and find out why it's taking that long.
- tom_ 1y agoMaybe it's phoning home to verify the app, or whatever it is it does? Launch times for MS Word on my 11 year old Macbook Pro, approx time to the opening dialog: First run since last reboot: 19 seconds Second run: 2.5 seconds Third run after sudo purge: 7 seconds Maybe it's an artefact of where I live, but the verify step always takes ages. First run of anything after a reboot takes an outlandish amount of time. GUI stuff is bad; Unix-type subprocess-heavy stuff is even worse. Judging by watching the Xcode debugger try to attach to my own programs, when they are in this state, this is not obviously something the program itself is doing.
- godelski 1y agoI think you're right. I rarely use word and so it was definitely running "cold" I went ahead and did another run and it was much faster. About 2 seconds. So things are definitely being cached. I did a trace on it (Instruments) and there's a lot of network activity. Double the time after sudo purge. There's 2 second of network time where the previous run only spent 1 second. Ran a tad faster when I turned the network off, though ended up using more CPU power. FWIW, looks to be only using 4 of my 8 cores, all of which are performance cores. Also looks like it is fairly serialized as there's not high activation on any 2 cores at the same time. Like I'll see one core spike, drop, and then another core spike. If I'm reading the profiler right then those are belonging to the same subprocesses and just handing over to a different thread. For comparison, I also ran on ghostty and then opened vim. Ghostty uses the performance cores but very low demand. vim calls the efficiency cores and I don't see anything hit above 25% and anytime there's a "spike" there's 2, appearing across 2 cores. Not to mention that ghostty is 53MB and nvim is more than a magnitude less. Compared to Word's 2.5GB... I stand by my original statement. It's a fucking text editor and it should be nearly instantaneous. As in <1s cold start.
- jmmv 1y ago> Grab a fucking profiler, it is more important than your Big O This is exactly why I wrote https://jmmv.dev/2023/09/performance-is-not-big-o.html https://jmmv.dev/2023/09/performance-is-not-big-o.html a few years back. The focus on Big O during interviews is, I think, harmful.
- godelski 1y agoI think you're right. Early on I did HPC and scientific computing. No one talked about Big O. Maybe that's because a lot of people were scientists, but still, there was a lot of focus on performance. Really how people were optimized is with a profiler. You talk about the type of data being processed and how and looked for the right way to do things based on this and people didn't do the reductions and simplifications in Big O. Those simplifications are harmful when you start thinking about parallel processing. There's things you might want to do that would look silly in serial process. O(2n) can be better than O(n) because you care about the actual functions. Let's say you have a loop and you do y[i] = f(x[i]) + g(x[i]). If f and g are heavy then you may want to split this out into two loops y[i] += f(x[i]) and y[i] += g(x[i]) since these are associative (so non-blocking). Most of the work was really about I/O. Those were almost always the bottlenecks. Your Big O won't help there. You gotta write things with awareness about where in memory it is and what kind of memory is being used. All about how you break things apart, operate in parallel, and what you can run asynchronously. Honestly, I think a big problem these days is that we still operate as if a computer has 1 CPU and only one location for memory.
- mjevans 1y agoWhat more harmful is probably not having a set of guilds / unions (that both work together, share the same collective bargains, but also compete for members) to cut a lot of the annoying for ALL sides involved interview process out. Why do they ask about Big O? Because it works as a filter. That's how bad some of the candidates are. What would I rather they do? Have a non-trivial but obviously business unrelated puzzle that happens to include design flaws and the interviewee is given enough time and latitude to 'fulfill the interface, but make this the best it can be'.
- genewitch 1y agois there a windows profiler that i can use on microsoft binaries to see what the hold-up is? I think 15 years ago i used valgrind and i cannot remember for what. Either way, there's a ton of stuff i want to report, either to microsoft (they won't care), but the internet might. i've managed to track down powershell in windows terminal taking forever to fully launch down to "100% gpu usage in the powershell process", but i'd really like to know what it thinks it's doing. also: 4 seconds to blank document in Word. the splash screen is most of that. notepad++ ~2 seconds. notepad.exe slightly over 1 second before the text content loads. Edge: 2 seconds to page render from startup. Oh and powershell loads instantly if i switch to the "old" terminal, but the old terminal doesn't have tabs, so that's a non-starter. "forever" above means 45-60 seconds.
- p_l 1y agoThe splash screens usually "hide" various loading steps. In Excel it's often loading and initialization of various extensions, for example.
- tekknik 1y agoyou’re asking for people to care about something they do a few times a day and further asking people to devote time to this. it’s ok if you feel this is important but as a developer for over 15 years i don’t care if my text editor takes 10 seconds to start as i have other things starting at the same time that takes longer. or put another way, if you care about text editor performance, or are hyper focused on performance in all cases, you miss the point of software development