假设您正在考虑购买新处理器,突然间您必须在两种产品之间做出选择,这两种产品在纸面上几乎相同,但其中一种具有称为超线程(hyperthreading)的功能,而另一种则没有。
显然超线程是一件好事,因为您必须为此支付额外费用,但它有什么作用呢?最重要的是,这是您(you)应该关心的事情吗?为了回答这些紧迫的问题,我们必须绕道而行,了解CPU(CPUs)是如何工作的。
无限力量!
即使您对计算机技术(computer technology)的精细技术细节不是很感兴趣,您也可能以前听说过摩尔定律(Moore’s Law)。这并不是一个真正的自然规律,而是一种观察,即集成电路的基本组件密度每两年左右翻一番。
实际上,这意味着CPU的性能每两年翻一番,这是一个指数级的改进。如果世界上最快的汽车是两年前问世的汽车的两倍,并且这种趋势持续数十年,我们将拥有具有科幻(science fiction)星际飞船速度的汽车。所以这实际上是计算机技术(computer technology)最具革命性的事情之一。
问题在于CPU的性能
不仅仅取决于其组件的密度。时钟速度(clock speed),即它在一秒钟内可以执行多少个完整的计算周期,显然很重要。如果您使用CPU并将其时钟速度提高(clock speed)一倍,它的性能也会提高一倍。至少在理论上。
问题是,无论处理器工作得有多快,它一次只能做一件事。我们所理解的“多任务”实际上是处理器在数千个不同的工作之间快速跳跃。几年前,在让单个处理器越来越快时,我们开始碰壁。
因此,解决方案之一是在每个处理器中放置多个CPU,以便在它们之间分配各种工作。如今,四核CPU(CPUs)几乎是主流配置。
超线程(Hyperthreading )(HT) 是 Intel 对同时多线程(simultaneous multithreading)的名称。这基本上意味着一个CPU 内核(CPU core)可以同时处理两个问题。这并不意味着CPU可以做两倍的工作。只是它可以通过一次处理多个更简单的问题来确保使用其所有容量。
对于您的操作系统(operating system),每个真正的硅CPU 内核(CPU core)看起来都像两个,因此它为每个工作提供支持,就好像它们是分开的一样。由于 CPU 所做的很多事情都不足以使其发挥最大作用,因此 HT 确保您从该芯片中获得物有所值。
谁应该关心
超线程(Hyperthreading)?
这是另一个可能有点复杂的问题,但当你分解它时实际上非常简单。首先(First),让我们提出几乎总是正确的关于超线程的一件事。如果您必须在可以处理相同数量线程但内核数量不同的两个处理器之间进行选择,请选择具有更多物理内核的CPU。
例如,如果您有双核、超线程CPU和非 HT 四核CPU,则四核选项(quad core option)是更好的选择。鉴于它们在单线程、单核性能(core performance)上彼此接近。为什么?因为四核CPU拥有更多的物理处理硬件(processing hardware)。
当你有两个物理规格相同的CPU(CPUs)
,但一个有 HT 而另一个没有时,真正的泡菜就出现了。现在我们的问题确实与您要运行的软件有关。如果您的软件也可以产生足够的线程来使用 HT 线程,那么您会看到选择具有超线程
的CPU带来的显着提升。(CPU)仅仅(Simply)是因为没有浪费任何处理能力(processing capacity),并且组件在尽可能多的时间内都在发挥其全部潜力。
如果您要运行的软件没有产生足够的线程来使用 HT 虚拟内核,那么您实际上不会看到性能上的差异。
传统上,诸如CPU 3D
渲染、视频编码(video encoding)和照片处理之类的操作(photo manipulation)将创建尽可能多的线程,因为你的CPU可以使用。换句话说,许多现代专业应用程序都需要线程。这就是为什么超线程(Hyperthreading)仅限于专业级CPU(CPUs),例如i7 和更高版本(i7 and up)。
诸如文字处理器和网络浏览器之类的主流(Mainstream)应用程序在超线程方面的表现并不会更好,即使它们可以产生更多线程。仅仅(Simply)因为大多数人使用的这些应用程序的需求甚至不会给入门级CPU(CPUs)
带来困难。
大游戏问题
视频游戏是另一个对(Video)超线程(Hyperthreading)相当冷漠的主流应用程序。在撰写本文时,2019 年,最新的视频游戏(video game)引擎开始变得更加繁重。这意味着支持 HT 的CPU(CPUs)将在其中表现更好。较旧的游戏根本看不到任何优势,除了一些大量使用人工智能或其他以 CPU 为中心的进程的模拟类游戏。
这是否意味着您的下一台游戏 PC 应该具有
超线程(Hyperthreading)?问题是,我们现在正在进入一个主流CPU 市场(CPU market)
,其中六核、八核和十二核CPU(CPUs)是常态。因此,在可能的情况下拥有更多的物理内核要好得多。
简单的答案
希望上面的解释已经足够清楚了,但让我们把它分解成底线:
- 如果您从事专业、线程繁重的工作,超线程很重要
- 如果您是主流用户,请不要担心!
- 如果您是一名游戏玩家,请优先考虑在您的下一个构建中拥有更多内核而不是 HT,但如果价格合适,请额外获得 HT。
超线程(Hyperthreading)是一项伟大的技术,但它并不值得每个人都花这么多钱。现在你应该知道那个“某人”是不是你了!
What is Hyperthreading and Why Should You Care?
Let’s say you’re looking at buying a new processor and suddenly you haνe to decide between two products that are both just about the same on paper, but one of them has a feature called hyperthreading and the other doesn’t.
Clearly hyperthreading is a good thing because you have to pay extra for it, but what does it do? Most importantly, is it something that you should care about? To answer these burning questions, we have to take a short detour into how CPUs do their thing.
Unlimited Power!
Even if you aren’t all that interested in the fine technical details of computer technology, you’ve probably heard of Moore’s Law before. It’s not really a natural law, but an observation that the basic components of integrated circuits were doubling in density every two years or so.
In effect this meant that the performance of a CPU would double every two years, which is an exponential rate of improvement. If the fastest car in the world was twice as fast as the one that came out two years ago and that trend continued for decades, we would have vehicles with the speeds of science fiction starships. So this is actually one of the most revolutionary things about computer technology.
The problem is that the performance of a CPU
isn’t just determined by the density of its components. It’s clock speed, which
is how many full calculation cycles it can perform in a second, is obviously
important. If you take a CPU and you double its clock speed, it will perform twice
as well. At least in theory.
The problem is that, no matter how fast that processor works, it can only do one thing at a time. What we perceive as “multitasking” is actually the processor rapidly jumping between thousands of different jobs. A few years ago, we started hitting a few brick walls when it came to making a single processor faster and faster.
So, one of the solutions was to put more than one CPU in every processor, so that the various jobs could be divided between them. Today, quad-core CPUs are pretty much the mainstream configuration.
Hyperthreading (HT)is Intel’s name for simultaneous multithreading. It basically means that one CPU core can work on two problems at the same time. It doesn’t mean that the CPU can do twice as much work. Just that it can ensure all its capacity is used by dealing with multiple simpler problems at once.
To your operating system, each real silicon CPU core looks like two, so it feeds each one work as if they were separate. Because so much of what a CPU does is not enough to work it to the maximum, HT makes sure you’re getting your money’s worth from that chip.
Who Should Care About
Hyperthreading?
This is another question that can be a little complicated but is actually pretty simple when you break it down. First, let’s put out the one thing about hyperthreading that’s almost always true. If you must choose between two processors that can handle the same number of threads, but don’t have the same number of cores, go with the CPU that has more physical cores.
For example, if you have a dual-core, hyper-threaded CPU and a non-HT quad-core CPU, the quad core option is the better choice. Given that they are close to each other in single-thread, single core performance. Why? Because the quad-core CPU has more physical processing hardware.
The real pickle comes when you have two CPUs
with the same physical specifications, but one has HT and the other doesn’t.
Now our question really has to do with the software that you want to run. If
you have software that can spawn enough threads to use the HT threads as well,
you’ll see a significant boost from opting for the CPU with hyperthreading.
Simply because none of the processing capacity is being wasted and the
component is working near its full potential as much of the time as possible.
If the software you want to run doesn’t spawn
enough threads to also use the HT virtual cores, you’ll see literally no
difference in performance.
Traditionally operations such as CPU 3D
rendering, video encoding, and photo manipulation will create as many threads
as your poor CPU can take. In other words, many modern professional
applications are thread-hungry. This is why Hyperthreading has been restricted
to professional-tier CPUs such as the i7 and up.
Mainstream applications such as word
processors and web browsers aren’t going to perform any better with
hyperthreading, even if they can spawn more threads. Simply because the needs
of those applications as used by most people doesn’t even give entry-level CPUs
a hard time.
The Big Gaming Question
Video games are another mainstream application
that’s been fairly apathetic to Hyperthreading. At the time of writing, in
2019, the latest video game engines are starting to become more thread heavy.
Which means HT-enabled CPUs will perform better in them. Older titles won’t see
any advantage at all, with the exception of a few simulation-type games that
make heavy use of AI or other CPU-centric processes.
Does that mean your next gaming PC should have
Hyperthreading? The thing is, we are now moving into a mainstream CPU market
where six-, eight- and twelve- core CPUs are the norm. So, it’s far better to
have more physical cores where possible.
The Simple Answer
Hopefully the above explanation has been clear
enough, but let’s break it down to the bottom line:
- If you do professional,
thread-heavy work, Hyperthreading matters
- If you are a mainstream user,
don’t worry about!
- If you are a gamer, prioritize
having more cores in your next build over HT, but get HT in addition if the
price is right.
Hyperthreading is a great technology, but it’s
not worth the premium for everyone. Now you should know whether that “someone”
is you or not!