-
Notifications
You must be signed in to change notification settings - Fork 631
Translate 2.6.0-preview3 post (zh_cn) #1890
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
Conversation
|
||
Ruby 2.6 引入了 `RubyVM::AST` 模块。 | ||
|
||
此模块提供 `parse` 方法,传入 Ruby 代码字符串,返回 AST(抽象语法树) 节点。而 `parse_file` 方法则接受一个 Ruby 代码文件作为参数,返回 AST 节点。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space before 节.
|
||
* 提升 `Proc#call` 的速度,因为我们无需再关心 `$SAFE`。[[功能 #14318]](https://bugs.ruby-lang.org/issues/14318) | ||
|
||
通过 `lc_fizzbuzz` 多次使用 `Proc#call` 的基准测试我们测量到了 1.4 倍性能提升 [[漏洞 #10212]]((https://bugs.ruby-lang.org/issues/10212))。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trivial, just notice you interchangeably use benchmark and 基准测试, maybe just one?
|
||
Ruby 2.5 提升了代码块传递的性能。[[功能 #14045]](https://bugs.ruby-lang.org/issues/14045) 另外,Ruby 2.6 提升了传递代码块调用时的性能。通过 micro-benchmark 我们观察到了 2.6 倍性能提升。 | ||
|
||
* 引入了瞬态堆 (theap)。 [Bug #14858] [Feature #14989] 瞬态堆是用于管理指向特定类(Array, Hash, Object 和 Struct)短生命周期内存对象的堆。例如,创建小而短生命周期的哈希对象的速度提升到了 2x 快。根据 rdoc benchmark,我们观察到了 6% 到 7% 的性能提升。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x => 倍
Thanks @dsh0416! |
b6dde81
to
2c5c0e6
Compare
@hlcfan Thank you so much for your reviewing. The problems mentioned have been fixed. |
2c5c0e6
to
df84a02
Compare
df84a02
to
6664dca
Compare
👍 |
No description provided.