TruffleRuby 社群版 1.0 RC7,Ruby 語言的高效能實現
TruffleRuby 社群版 1.0 RC7ofollow,noindex">釋出了 ,TruffleRuby 是 Ruby 程式語言的高效能實現,與 MRI 2.4.4 相容,基於 Oracle Labs 的 GraalVM。可以使用 gu 程式在 GraalVM 中安裝 Ruby 語言元件。
TruffleRuby 執行 Rails,並通過了大部分 Rails 測試套件的測試。但它缺少對 Nokogiri 和 ActiveRecord 資料庫驅動程式的支援,這使得它目前執行真正的 Rails 應用程式變得不切實際。
TruffleRuby 的目標
-
更快地執行 Ruby 程式碼
-
並行執行 Ruby 程式碼
-
以較少的時間啟動 Ruby 應用程式
-
在託管環境中執行 C 擴充套件
-
提供偵錯程式和監控等新工具
-
保持與標準 Ruby 實現的高度相容性
TruffleRuby 的系統相容性
已在下面這些系統通過測試
更新內容包括新增特性、bug 修復和提升效能。
新特性
-
為更多外聯物件(foreign objects)新增有用的字串檢查
-
C 擴充套件 API 現在定義了前處理器巨集 TRUFFLERUBY
-
添加了 rbconfig/sizeof 原生擴充套件以獲得更好的 MRI 相容性
-
支援
pg
1.1。擴充套件現在已經可以成功編譯,但是可能仍有一些資料型別的問題。
Bug 修復
-
readline
can now be interrupted by the interrupt signal (Ctrl+C). This fixesCtrl+C to work in IRB.
-
Better compatibility with C extensions due to a new "managed struct" type.
-
Fixed compilation warnings which produced confusing messages for end users (#1422 ).
-
Improved compatibility with Truffle polyglot STDIO.
-
Fixed version check preventing TruffleRuby from working with Bundler 2.0 and
later (#1413 ).
-
Fixed problem with
Kernel.public_send
not tracking its caller properly (#1425 ). -
rb_thread_call_without_gvl()
no longer holds the C-extensions lock. -
Fixed
caller_locations
when called insidemethod_added
. -
Fixed
mon_initialize
when called insideinitialize_copy
(#1428 ). -
Mutex
correctly raises aTypeError
when trying to serialize withMarshal.dump
.
效能
-
Reduced memory footprint for private/internal AST nodes.
-
Increased the number of cases in which string equality checks will become
compile-time constants.
-
Major performance improvement for exceptional paths where the rescue body
does not access the exception object (e.g.,
x.size rescue 0
).
原始碼下載和釋出說明:https://github.com/oracle/truffleruby/releases/tag/vm-1.0.0-rc7