YARV

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書
YARV
開發者笹田耕一
程式語言C[1]
類型Ruby虛擬機器器
許可協定 編輯維基數據連結
網站www.atdot.net/yarv/

YARV是「Ruby程式語言」的一個位元組碼解譯器,它是由笹田耕一領導的。YARV這個名稱是「Yet another Ruby VM」(又一個Ruby虛擬機器器)的首字母縮寫。這個專案的目標是大幅度地減少Ruby程式的執行時間。

在YARV成為Ruby 1.9的官方解譯器後,人們也稱它為KRI(Koichi's Ruby Interpreter,Koichi的Ruby解譯器)。

效能[編輯]

由rubychan.de給出的評分,可以看到YARV有着大幅的效能提升。[2] 而Antonio Cangiano 給出的評分顯示,平均起來YARV比原來的解譯器要快3倍。[3] 兩個評分給出的都是綜合性的結果。

據報導,在YARV上執行的Ruby on Rails 比在1.8.6上執行要快15%[4]。然而,啟動和ActiveRecord功能反而變慢了。

歷史[編輯]

在2007年1月1日,YARV首次出現在Ruby下個版本的CVS庫之中。[5] 後來,Ruby的創造者松本行弘把YARV完全放入Ruby 1.9.0(於2007年12月26日發佈)[6] 。從這個版本起,YARV成為了官方的Ruby直譯器,取代原本由松本行弘製作的版本。

另見[編輯]

參照[編輯]

  1. ^ Sasada, Koichi. YARV: Yet Another RubyVM (PDF). atdot.net. [2013-08-18]. (原始內容 (PDF)存檔於2020-09-25). 
  2. ^ Benchmarks: Ruby 1.8 and Ruby 1.9頁面存檔備份,存於互聯網檔案館) (rubychan.de)
  3. ^ Cangiano, Antonio. The Great Ruby Shootout. 2007-03-12 [2008-02-01]. (原始內容存檔於2012-02-23). 
  4. ^ Rails on 1.9: first benchmarks, YARV exposed to non-synthetic tests. eigenclass.org. 2007-03-28 [2008-09-13]. (原始內容存檔於2008-12-18). When benchmarking basic requests with a minimalistic schema (only one int column), even though YARV serviced requests 15% faster, it took much longer to load the environment (50% slower). This comes as no surprise since plain old (evil) eval is slower in YARV(...)In fact, the mere fact of requiring active_record (and indirectly ActiveSupport) causes a sharp decrease in performance. 
  5. ^ The Ruby VM: Episode I Archive.is存檔,存檔日期2012-05-26 - Shades of Gray
  6. ^ merge YARV頁面存檔備份,存於互聯網檔案館) announcement by Koichi Sasada

外部連結[編輯]