June 18, 2006

深入分析 Python 直譯器

Thinker 前輩抽出他當兵休假的寶貴時間,整理一篇技術筆記 [Notes of Python interpreter - by thinker],探討 Python 2.4.3c1 的內部實做。Python VM 作為一個實做物件導向語言的 stack machine,不免令人聯想到 Java VM 設計的規範,[Performance] 一節有談到 Python 內部如何透過 Dictionary 來改善 runtime reference 的效能議題,稍後也做了比較,以 primitive type 而言,有此語言設計的 Java 很顯然允許進一步最佳化的可能性。此外,Thinker 也談到 Python compiler 的設計細節,分析了 pycodegen.py,這些概念,對理解 Python JIT compiler [psyco] 有很大的幫助,可進一步參考 [Psyco::Documentation]。
由 jserv 發表於 June 18, 2006 04:22 PM
迴響