Skip to content

24章翻译优化 #537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2020
Merged

24章翻译优化 #537

merged 2 commits into from
Aug 7, 2020

Conversation

wailjn
Copy link
Contributor

@wailjn wailjn commented Aug 7, 2020

删掉了重复的一段,顺便按照自己的理解修改了一下下面几段的翻译

@@ -53,42 +53,40 @@ slowdown occurs):

同时在多个位置完成多任务。这解决了所谓的 CPU 密集型问题:将程序分为多部分,在多个处理器上同时处理不同部分来加快程序执行效率。

上面的定义告诉了我们术语令人困惑的原因:两者的核心是“同时完成多个任务”。并行增加了跨多个处理器的分布。更重要的是,这两种方法可以解决不同类型的问题:解决I / O绑定问题和并行化可能对您没有任何好处,因为该问题不是整体速度,而是阻塞。采取计算约束问题并尝试在单个处理器上使用并发性解决问题可能会浪费时间。两种方法都试图在更短的时间内完成更多工作,但是它们实现加速的方式却有所不同,并且取决于问题所施加的约束
上面的定义说明了这两个术语令人困惑的原因:两者的核心都是“同时完成多个任务”,不过并行增加了跨多个处理器的分布。更重要的是,它们可以解决不同类型的问题:并行可能对解决I / O密集型问题没有任何好处,因为整体速度不是问题,阻塞才是。而尝试在单个处理器上使用并发来解决计算密集型问题也可能是浪费时间。两种方法都试图在更短的时间内完成更多工作,但是它们实现加速的方式有所不同,这取决于问题施加的约束
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为整体速度不是问题,阻塞才是。

这个读起来很怪,贴原文一起看看吧。读起来感觉隐藏含义很多。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原文:
The reason the terminology is confusing is shown in the definitions above: the core of both is “accomplishing more than one task at the same time.” Parallelism adds distribution across multiple processors. More importantly, the two solve different types of problems: taking an I/O-bound problem and parallelizing might not do you any good because the problem is not overall speed, it’s blocking. And taking a compute-bound problem and trying to solve it using concurrency on a single processor might be a similar waste of time. Both approaches try to accomplish more in less time, but the way they achieve speedup is different, and depends upon constraints imposed by the problem.
我的理解是并发可以在任务等待时间内切换运行其他任务来提高CPU运行效率,而并行将任务分解成多个部分,在多个处理器上同时运行,使得任务的整体运行速度提高。对于IO密集型问题来说,关键的问题在于等待IO时的阻塞,即使并行将任务分解成多个部分,任务也还是需要阻塞以等待IO,所以并行对IO密集型问题没有什么太大的帮助。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他这个简短了很多信息。
可以考虑补全。

「因为问题不在于程序的整体执行速度,而在于I/O阻塞」

如果不补全也翻译成
「因为问题不在整体执行速度,而在于阻塞」

原来的语序读起来太拗口

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已更新

@sjsdfg sjsdfg merged commit e6d9c41 into lingcoder:master Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants