这是用户在 2024-6-7 17:25 为 https://www.datagubbe.se/stupidslow/ 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?

{ datagubbe } { 数据古贝 }


datagubbe.se » stupid slow
datagubbe.se » 愚蠢的慢

Stupid Slow: The Perceived Speed of Computers
愚蠢的慢:计算机的感知速度

Summer 2024 2024 年夏季

Computers today are faster than ever. They are faster at crunching numbers, they can handle more I/O and they can produce better quality graphics than anything previously produced. Even a dirt cheap modern microcontroller will run in circles around the home computers I grew up with. And yet, computers today often feel slow.
今天的计算机比以往任何时候都快。它们处理数字的速度更快,可以处理更多的 I/O,并且可以生成比以前生成的任何图形质量更好的图形。即使是非常便宜的现代微控制器也会在我长大的家用电脑周围运行。然而,今天的计算机通常感觉很慢。

There's recently been some discussion about why computers feel slow today. Discussions like these return with regular intervals. Sometimes the focus is on bloat and resource glut, sometimes on the fact that despite ample hardware resources, software still runs slowly. The discussion has been going on for a while. One of its most famous installments is Niklaus Wirth's A Plea for Lean Software.
最近有一些关于为什么今天计算机感觉很慢的讨论。类似的讨论会定期出现。有时焦点是膨胀和资源过剩,有时焦点是尽管硬件资源充足,但软件仍然运行缓慢。讨论已经持续了一段时间。其中最著名的文章之一是 Niklaus Wirth 的《A Plea for Lean Software》。

I agree with most of the critique and could easily write a very long and very bitter essay about the state of modern software. But I also think that abstraction is both too useful and too profitable to go away anytime soon. The key is balance, but balance is problematic in itself, because it isn't an absolute. One person's necessity is another person's bloat.
我同意大多数批评,并且可以轻松地写一篇关于现代软件现状的又长又苦涩的文章。但我也认为抽象太有用、太有利可图,不能很快消失。关键是平衡,但平衡本身就有问题,因为它不是绝对的。一个人的需要就是另一个人的膨胀。

Without delving further into the depths of this discussion - which is much more complex than one might think - I'd like to explore an argument often made about how computers used to feel much faster. That doesn't mean that a Commodore 64 can mine bitcoin at speeds comparable to a modern GPU, but rather that for proportional workloads, computers used to be perceived as much snappier than they presently are.
在不进一步深入讨论这一讨论的情况下(这比人们想象的要复杂得多),我想探讨一个经常出现的关于计算机过去如何感觉更快的争论。这并不意味着 Commodore 64 可以以与现代 GPU 相当的速度挖掘比特币,而是说对于成比例的工作负载,过去的计算机被认为比现在更快。

First of all, is this a reasonable claim? I personally think so. Most of the time computers are faster and better than ever. Most of the time. Sometimes they're very slow, and the problem is that they're stupid slow: there's no rhyme or reason to why they're so abysmal at certain things when they're so fast at others.
首先,这个说法合理吗?我个人是这么认为的。大多数时候,计算机比以往任何时候都更快更好。大多数时候。有时他们非常慢,问题是他们慢得愚蠢:没有任何押韵或理由可以解释为什么他们在某些事情上如此糟糕,而在其他事情上却如此之快。

Microsoft Teams, for example, will toss around sound and video for massive online meetings like there's no tomorrow, but feels like glue when switching between two different text chats. I can search for messages sent by a multitude of users across a span of several years, but when browsing the results, the UI is like treacle.
例如,微软团队会在大型在线会议中使用声音和视频,就像没有明天一样,但在两个不同的文本聊天之间切换时感觉就像胶水一样。我可以搜索多个用户在几年内发送的消息,但在浏览结果时,用户界面就像糖浆一样。

Though it might be particularly prevalent in business software from megacorps, stupid slow is everywhere - such as in modern terminal emulators suffering from a capped frame rate. As a software developer, I can of course come up with a number of rationalizations for why things are the way they are. As a user, I'm just perpetually annoyed.
尽管它在大型企业的商业软件中可能特别普遍,但愚蠢的缓慢现象随处可见 - 例如在现代终端模拟器中,帧速率受到限制。作为一名软件开发人员,我当然可以想出一些合理的解释来解释为什么事情是这样的。作为一名用户,我总是很恼火。

This feeling of perpetual annoyance comes from somewhere, and I believe it's increased over time. Input lag, for example, was something I hardly ever experienced during the 1990s, but it seems to have crept in everywhere since then.
这种永远烦恼的感觉来自某个地方,而且我相信它会随着时间的推移而增加。例如,输入延迟是我在 20 世纪 90 年代几乎没有遇到过的问题,但从那时起它似乎已经无处不在。

So, are computers less snappy today?
那么,现在的电脑是不是变得不那么敏捷了呢?

Windows 95: Your Mileage May Vary
Windows 95:您的情况可能会有所不同

Wirth wrote his plea for lean software in February of 1995, a couple of months before Microsoft released Windows 95. At this time, Microsoft had a solid position on the business software market, but their dominance was in no way as certain back then as it is now. In many ways, the roaring success of Windows 95 - along with ever-cheaper PC hardware - was what truly cemented Microsoft as the de facto monopoly in both business and home computing.
Wirth 在 1995 年 2 月写下了他对精益软件的呼吁,即微软发布 Windows 95 的几个月前。此时,微软在商业软件市场上拥有稳固的地位,但他们的主导地位远不如当时那么确定。就是现在。从很多方面来说,Windows 95 的巨大成功以及越来越便宜的 PC 硬件真正巩固了微软在商业和家庭计算领域事实上的垄断地位。

I consider Windows 95 to be a watershed moment in more ways than one. It is, to me, what truly introduced the concept of bloat and poor performance to the world of consumer and small business software. Much business computing was, at this time, still taking place in DOS. A single tasking system, virtually unchanged since the early 1980s and mostly running text mode applications, will of course feel snappy - especially on a 486 machine.
我认为 Windows 95 在很多方面都是一个分水岭。对我来说,它真正将臃肿和性能不佳的概念引入了消费者和小型企业软件的世界。此时,许多商业计算仍在 DOS 中进行。自 20 世纪 80 年代初以来几乎没有变化且主要运行文本模式应用程序的单一任务系统当然会感觉很敏捷 - 特别是在 486 机器上。

Windows 95 was a stark contrast to this. Above all, it's prone to swapping, which is catastrophic on an old mechanical IDE drive. MS-DOS, Amiga, Atari and other older systems never swapped, because they couldn't swap: you either had enough memory, or you didn't.
Windows 95 与此形成鲜明对比。最重要的是,它很容易发生交换,这对于旧的机械 IDE 驱动器来说是灾难性的。 MS-DOS、Amiga、Atari 和其他较旧的系统从不交换,因为它们无法交换:你要么有足够的内存,要么没有。

It's hard to give a fair and unified assessment of the 1990s Windows experience. Many Windows 95 users have fond memories of it. For others, it will probably trigger a desire to assume fetal position and start sobbing uncontrollably. In hindsight, it was a decent desktop environment with a clear and coherent interface design. It was also a massive resource hog. Microsoft themselves recommended a 486 computer with 8 megabytes of RAM, but in reality, even this was a bit optimistic. Just a couple of years later, when Windows 98 was released, the average consumer machine was much better matched to the actual hardware requirements. The same can, honestly, be said for Linux paired with an ever so modest X11 window manager.
很难对 20 世纪 90 年代的 Windows 体验做出公正且统一的评估。许多Windows 95用户都对它有着美好的回忆。对于其他人来说,这可能会引发想要采取胎儿姿势并开始无法控制地抽泣的欲望。事后看来,这是一个不错的桌面环境,具有清晰、连贯的界面设计。它也是一个巨大的资源消耗者。微软自己推荐了一台具有 8 MB RAM 的 486 计算机,但实际上,即使这样也有点乐观。仅仅几年后,当 Windows 98 发布时,普通消费者计算机就更好地满足了实际的硬件要求。老实说,对于搭配如此低调的 X11 窗口管理器的 Linux 来说也是如此。

Coming from the Amiga, Windows 95 felt like a bad joke even on a Pentium: slow, janky and constantly tormenting the hard drive with page file access. On the other hand, I was very fond of Windows NT 4 on my 333 MHz Pentium II with 64 megs of RAM: with a little bit of know-how and decent hardware specs, it was capable of producing a smooth and snappy experience. Once it had finished booting, of course.
来自 Amiga 的 Windows 95 即使在 Pentium 上也感觉像是一个糟糕的笑话:缓慢、卡顿,并且通过页面文件访问不断折磨硬盘驱动器。另一方面,我非常喜欢我的 333 MHz Pentium II 和 64 MB RAM 上的 Windows NT 4:只要有一点专业知识和不错的硬件规格,它就能够产生流畅而敏捷的体验。当然,一旦它完成启动。

Das Boot 启动

Boot speed is one area where people often point to recent improvements. Indeed, both Windows and most desktop Linux systems have traditionally been slow booters, a trend that continued until relatively recently. It wasn't uncommon to have to wait several minutes for a Windows 95 PC to present a usable desktop.
启动速度是人们经常指出最近改进的领域之一。事实上,Windows 和大多数桌面 Linux 系统传统上启动速度都很慢,这种趋势一直持续到最近。必须等待几分钟才能让 Windows 95 PC 呈现可用桌面的情况并不罕见。

In preparation for writing this text, I timed the boot process on two of my Linux PCs. One is a Thinkpad from 2022, with an Intel i7 CPU, 32 gigs of RAM and an SSD disk. It takes about 32 seconds to boot Ubuntu not to a usable desktop, but to the graphical login screen. The other is an Ideapad from 2012, with an Intel i5 CPU, 8 gigs of RAM and an SSD disk. It needs 25 seconds to boot Debian, again to the graphical login prompt. That's not bad, especially not considering that the same Ideapad took at least a minute to boot when it was running Windows 8 from a mechanical hard drive.
为了准备撰写本文,我在两台 Linux PC 上对启动过程进行了计时。其中一款是 2022 年推出的 Thinkpad,配备 Intel i7 CPU、32 GB RAM 和 SSD 磁盘。 Ubuntu 大约需要 32 秒才能启动到可用的桌面,而是启动到图形登录屏幕。另一个是 2012 年的 Ideapad,配备 Intel i5 CPU、8 GB RAM 和 SSD 磁盘。启动 Debian 需要 25 秒,再次出现图形登录提示。这还不错,特别是考虑到同一个 Ideapad 在从机械硬盘驱动器运行 Windows 8 时至少需要一分钟才能启动。

On the other hand, I also timed my Amiga 600. It's got a 7 MHz 68000 CPU, 2 megs of RAM and a Compact Flash card acting as an IDE hard drive. It takes 17 seconds to cold boot into a fully functional desktop environment. A few seconds may have to be added for this to reflect a mechanical hard drive, but not many - the drive itself usually isn't the bottleneck, but rather the speed of the bus it's sitting on. I still remember timing my 14 MHz A1200 with a spinning IDE drive in 1994. It took around 20 seconds to boot - and that was with a lot of third party utilities being loaded.
另一方面,我也对我的 Amiga 600 进行了计时。它有一个 7 MHz 68000 CPU、2 MB RAM 和一个用作 IDE 硬盘驱动器的 Compact Flash 卡。冷启动进入功能齐全的桌面环境需要 17 秒。可能需要添加几秒钟才能反映机械硬盘驱动器,但不会太多 - 驱动器本身通常不是瓶颈,而是它所在的总线的速度。我仍然记得 1994 年用旋转 IDE 驱动器对我的 14 MHz A1200 进行计时。启动大约需要 20 秒 - 而且加载了许多第三方实用程序。

Many Amigas were churned around from floppy, which warrants a comparison with this media as well. When using my own custom boot floppy (one with Deluxe Paint and a few other goodies), the Amiga 600 boots to a scaled down but functional desktop in around 30 seconds - still faster than the i7 Thinkpad. Similarly, an old IBM PC/AT cold boots to a DOS prompt in about 30 seconds, including spinning up the old 5.25" hard drive and doing a memory test. (Ironically, it thus boots slower the more RAM you've got.)
许多 Amiga 都是通过软盘制作的,这也值得与这种媒体进行比较。当使用我自己定制的启动软盘(带有 Deluxe Paint 和其他一些好东西的一张)时,Amiga 600 在大约 30 秒内启动到缩小但功能齐全的桌面 - 仍然比 i7 Thinkpad 快。同样,一台旧的 IBM PC/AT 冷启动到 DOS 提示符大约需要 30 秒,包括启动旧的 5.25 英寸硬盘并进行内存测试。(具有讽刺意味的是,RAM 越多,启动速度就越慢。)

I could time my Commodore 64 as well, but that would be rather pointless. Old 8-bit home computers will present a Basic prompt almost immediately after being switched on. Users of Atari's ST line of computers will have a similar experience: their whole OS resided in ROM.
我也可以为我的 Commodore 64 计时,但那毫无意义。旧的 8 位家用计算机在开机后几乎立即会出现 Basic 提示。 Atari ST 系列计算机的用户将有类似的体验:他们的整个操作系统驻留在 ROM 中。

Is it unfair to compare an 8-bit machine or Atari with the system in ROM to a modern computer loading a large and complex OS from disk? Perhaps - but such distinctions don't matter from a user perspective. A modern PC is roughly about a bajillion times faster in every possible way, and they still boot slower than an old home computer.
将 ROM 中系统的 8 位机器或 Atari 与从磁盘加载大型复杂操作系统的现代计算机进行比较是否不公平?也许 - 但从用户的角度来看,这种区别并不重要。现代电脑在各方面的速度大约快了数十亿倍,但它们的启动速度仍然比老式家用电脑慢。

The Gaming Pitfall 游戏陷阱

I'm not a gamer, and certainly not a modern one. My experience with games released after roughly 1995 consists mostly of casual PS3 gaming, short snippets seen on Youtube and brief glances over the shoulder of gamer friends. One thing I've noticed, though, is that my memory of game performance are wildly distorted by time. Chances are that if you played Sim City on the Amiga 500, Elite II on the Amiga 1200 or Doom on a 486SX machine, you're going to remember it as being much faster than it actually was. A mix of tempered expectations and excitement about something new has likely erased the low framerate from your mind - at least this has, time and time again, turned out to be the case for me.
我不是一名游戏玩家,当然也不是一个现代玩家。我对大约 1995 年之后发布的游戏的体验主要包括休闲 PS3 游戏、在 Youtube 上看到的简短片段以及从游戏玩家朋友的肩膀上短暂浏览。不过,我注意到的一件事是,我对游戏表现的记忆随着时间的推移而严重扭曲。如果您在 Amiga 500 上玩《模拟城市》、在 Amiga 1200 上玩《精英 II》或在 486SX 机器上玩《毁灭战士》,您可能会记得它比实际速度快得多。缓和的期望和对新事物的兴奋可能已经从你的脑海中消除了低帧率 - 至少对我来说,一次又一次的情况就是如此。

Try to find some Youtube footage of 1990s games being played on original hardware. Chances are you'll be unpleasantly surprised. When it comes to pure gaming performance, modern machines are leagues ahead of whatever we grew up with.
尝试在 Youtube 上找到一些在原始硬件上玩 20 世纪 90 年代游戏的视频。您很可能会感到不愉快的惊讶。就纯粹的游戏性能而言,现代机器远远领先于我们成长过程中使用的任何机器。

Serious Software 严肃的软件

Another area where modern computers shine is loading native programs. Even on my 2019 Acer Swift 1 with a Celeron CPU, Gimp, Abiword, GNumeric and Firefox start in, at most, a matter of seconds.
现代计算机的另一个亮点是加载本机程序。即使在我的配备 Celeron CPU 的 2019 Acer Swift 1 上,Gimp、Abiword、GNumeric 和 Firefox 最多也只需几秒钟即可启动。

On my Amiga 600, Deluxe Paint takes roughly 12 seconds to load from hard drive. The wait is of course even longer when loading it from floppy. It's not in any way unbearable - but it's a clear win for modern machines.
在我的 Amiga 600 上,Deluxe Paint 从硬盘加载大约需要 12 秒。从软盘加载时,等待时间当然更长。这并不是无法忍受的——但对于现代机器来说,这是一个明显的胜利。

As for program usage, a machine as cheap as a Raspberry Pi 3B will tackle workloads completely unimaginable on the Amiga. Though it pains me to admit it, even proportional workloads on the Amiga can at times feel sluggish. Deluxe Paint, for example, will happily spend seconds when flood filling a large, complex shape. Working with large brushes can at times feel sticky and cumbersome. Navigating large directories in Workbench - the Amiga's desktop environment - can be excruciatingly slow. Even scrolling text can be a bit of a bore, depending on the program - unlike old PCs, the Amiga doesn't have a hardware text mode. This, however, changes drastically on my Amiga 1200, sporting a 14 MHz 68020 CPU. Unsurprisingly, the roughly doubled speed offers a much smoother experience, which is also why it's my preferred workstation for retro tasks.
至于程序使用,像 Raspberry Pi 3B 这样便宜的机器将能够处理 Amiga 上完全无法想象的工作负载。尽管承认这一点让我很痛苦,但即使是 Amiga 上的相应工作负载有时也会让人感到迟缓。例如,豪华油漆在洪水填充大型复杂形状时会很高兴地花费几秒钟。使用大刷子有时会感觉又粘又麻烦。在 Workbench(Amiga 的桌面环境)中浏览大型目录可能会非常慢。甚至滚动文本也可能有点无聊,具体取决于程序 - 与旧 PC 不同,Amiga 没有硬件文本模式。然而,在我的配备 14 MHz 68020 CPU 的 Amiga 1200 上,情况发生了巨大变化。毫不奇怪,大约翻倍的速度提供了更流畅的体验,这也是为什么它是我执行复古任务的首选工作站的原因。

One thing that always feels fast, including on the Amiga 600, is task switching and user input. I've never experienced input lag frustration on the Amiga. Multitasking between several complex full screen applications is instantaneous - even when simultaneously replaying a funky tune with large sound samples, including vocals.
总感觉很快的一件事(包括在 Amiga 600 上)是任务切换和用户输入。我在 Amiga 上从未经历过输入延迟的挫败感。多个复杂的全屏应用程序之间的多任务处理是即时的 - 即使同时重放具有大量声音样本(包括人声)的时髦曲调。

Gimp on my Swift 1 does feel snappy, at least for my typical tasks of cropping, scaling and retouching. And Grafx 2, a pixel painter inspired by Deluxe Paint, positively flies. Of course, you'd expect an Amiga-sized workload on a modern PC to be, as my old chemistry teacher was fond of saying when pouring something toxic down the sink, "a fart in outer space".
我的 Swift 1 上的 Gimp 确实感觉很敏捷,至少对于我的裁剪、缩放和修饰等典型任务来说是这样。而受 Deluxe Paint 启发的像素画家 Grafx 2 表现也非常出色。当然,您会期望现代 PC 上的 Amiga 大小的工作负载就像我以前的化学老师在将有毒物质倒入水槽时喜欢说的那样,“外太空中的一个屁”。

For my very modest word processing and spreadsheet needs, the Amiga is perfectly comparable to native software on a modern PC. Alas, a lot of PC software today isn't native. Few popular sites or "web apps" (Youtube, Discord, Slack, Twitch, Netflix) feel even remotely snappy on my Swift 1. Many are slow even on the i7 Thinkpad, including ones running locally as Electron incarnations. They often fall into the category of stupid slow, too: It's not video replay that's troublesome on Netflix - it's browsing for something to watch that delivers a janky, choppy, frustrating experience on my Swift 1. Similarly, Slack - a chat program - often makes the Thinkpad's fan spin up when all of three people are having a vigorous plaintext conversation.
对于我非常有限的文字处理和电子表格需求,Amiga 完全可以与现代 PC 上的本机软件相媲美。遗憾的是,如今许多 PC 软件都不是原生的。很少有流行的网站或“网络应用程序”(Youtube、Discord、Slack、Twitch、Netflix)在我的 Swift 1 上感觉甚至有点快。即使在 i7 Thinkpad 上,许多网站或“网络应用程序”也很慢,包括在本地运行的 Electron 版本。它们也常常属于愚蠢缓慢的类别:在 Netflix 上麻烦的不是视频重播 - 而是在我的 Swift 1 上浏览要观看的内容,从而带来了卡顿、断断续续、令人沮丧的体验。同样,Slack - 一个聊天程序 - 通常当三个人都在进行激烈的明文对话时,Thinkpad 的风扇就会转动。

It's the Speed, Stupid
这就是速度,笨蛋

Most of the time though, an entry-level laptop from ten years ago can do video editing, 3D graphics, compilation, text processing and everything else we use computers for much faster and much better than any old home computer ever could. It'd be strange if this wasn't the case - clock speeds and memory sizes have increased a hundred- or thousandfold depending on what systems we're comparing.
但大多数时候,十年前的入门级笔记本电脑可以进行视频编辑、3D 图形、编译、文本处理以及我们使用计算机的其他所有操作,比任何老式家用计算机更快、更好。如果情况并非如此,那就太奇怪了——根据我们所比较的系统,时钟速度和内存大小已经增加了一百倍或数千倍。

The big difference, I think, is that home computers never felt stupid slow. Desktop Publishing on an Amiga 600? Please God, no! I've actually tried it. Text reflows are like Chinese water torture. Even handling scalable vector typefaces is such a tedium that Commodore included a tool in AmigaOS for rendering them to fixed size bitmap fonts. Loading a modestly-sized JPEG image? Maybe go grab a cup of coffee.
我认为,最大的区别在于家用电脑从来不会让人感觉很慢。在 Amiga 600 上进行桌面出版?求上帝保佑,不!我实际上已经尝试过了。文本回流就像中国的水刑。即使处理可扩展的矢量字体也是一件乏味的事情,Commodore 在 AmigaOS 中包含了一个工具,用于将它们渲染为固定大小的位图字体。正在加载大小适中的 JPEG 图像?也许去喝杯咖啡吧。

There's no surprise here, though. These are computationally intensive activities which will really stretch the capacity of a 7 MHz CPU. And while waiting for that JPEG file to load or a large archive to decompress, I could pass the time by playing a few levels of Sokoban on the same machine. The (admittedly primitive) game still felt responsive, because the Amiga wasn't stupid slow.
不过,这并不奇怪。这些是计算密集型活动,将真正扩展 7 MHz CPU 的容量。在等待 JPEG 文件加载或大型存档解压缩时,我可以通过在同一台机器上玩几个级别的推箱子来打发时间。这款(诚然是原始的)游戏仍然感觉反应灵敏,因为 Amiga 的速度并不慢。

While Windows 95 surely had the capacity for being slow, it was typically consistently slow. If your computer wasn't up to the task of running it, it was a magnificent dumpster fire. But at least it was a dumpster fire all the time: a not-so-subtle way of telling you to upgrade your machine.
虽然 Windows 95 确实有可能变慢,但它通常总是很慢。如果您的计算机无法胜任运行它的任务,那么这将是一场巨大的垃圾箱火灾。但至少它一直是垃圾箱火灾:一种不那么微妙的方式告诉你升级你的机器。

Indeed, why is Teams so slow when switching between two text chats? Why can't my Thinkpad handle a bit of Slack flooding when similar activity was perfectly performant in IRC on my old Amiga 1200? Why is Netflix so crappy at browsing titles when it can replay video perfectly fine even on an aging Celeron machine? Why is a contemporary terminal emulator sluggish and capped at 40 FPS? Why is Youtube slow at loading a list of videos when the actual replay is perfectly fine, and why is text input lagging behind in so many programs?
确实,为什么 Teams 在两个文本聊天之间切换时如此缓慢?为什么我的 Thinkpad 无法处理一些 Slack 泛洪,而在我的旧 Amiga 1200 上的 IRC 中却可以完美地执行类似的活动?为什么 Netflix 在浏览影片方面如此糟糕,即使在老化的赛扬机器上也能完美地重播视频?为什么当代的终端仿真器运行缓慢且帧速率上限为 40 FPS?为什么 Youtube 在实际重播完全正常的情况下加载视频列表时却很慢,以及为什么文本输入在这么多程序中滞后?

The answer is, in short, that we're running a lot of bad software. That's frustrating in its own right. What's even more frustrating is that we all know, deep down, that our machines are capable of something else.
简而言之,答案是我们正在运行很多糟糕的软件。这本身就令人沮丧。更令人沮丧的是,我们内心深处都知道,我们的机器还有能力做其他事情。

Our old home computers felt faster because they were only slow at the things we'd expect them to be slow at. Today, it seems to be other way around.
我们的旧家用计算机感觉更快,因为它们只在我们期望它们慢的事情上慢。今天,情况似乎有所不同。