Chez Scheme 的发展
本文摘自 The Development of Chez Scheme。
Chez Scheme 1
-
custom linker
-
flat closures
-
stack-based representation of control
-
boxing of assigned variables
-
BiBOP typing with reserved (16-bit) fixnum range (BiBOP, big bag of pages, where memory is broken up into fixed-size segments and a separate segment table is used to identify the type of object contained in each segment)
-
stop-and-copy collector
-
code pointers cached in symbol code-pointer slot
-
peephole optimization
Chez Scheme 2
-
multiple back ends
-
multiple operating systems
-
automatic closing of files by the collector (坏主意!)
-
optimizing letrec expressions and loops
-
inlining of primitives
-
destination-driven code generation (obviating peephole optimizer): Destination-driven code generation is a simple top-down technique that allows the code generated for a program phrase to depend upon its context in an abstract syntax tree. The context is encapsulated in a data destination and a control destination. The data destination specifies where the value computed by an expression is to be stored, while the control destination specifies where program execution is to resume after computation of the value. (非常像 CP0 原型)
-
faster compiler
-
faster collector
Chez Scheme 3
-
constant-time continuation operations and stack-overflow recovery (Use segmented stacks. Tracing distinguish tail calls by comparing continuations)
-
various new compiler optimizations
-
faster compilation
-
RISC architecture ports
Chez Scheme 4
-
hybrid tagging model (tagging pointer mechanism from T dialect, BiBOP to identify whether a value contains a pointer or being mutable)
-
inline allocation (bump allocation)
-
closure length moved from closures to code headers
-
literal references moved from closures to code stream
-
flonum size cut in half
-
generational garbage collection
-
intraprocedural register allocation
Chez Scheme 5
-
local call optimizations (unnecessary
procedure?
checks and indirect jumps → direct jumps) -
more compile-time checks
-
improved register allocation (Register allocation using lazy saves, eager restores, and greedy shuffling)
-
improved code generation
-
25X faster gensym (delay generation until the symbol is printed)
Chez Scheme 6
-
fast interpreter (为了在编译后的产物里支持
eval
) -
letrec optimization
-
procedure inlining (CP0)
-
faster continuation handling (one-shot continuations)
-
improved float printing
CP0 在另外一篇 文章 里有介绍。
Chez Scheme 7
-
thread support
-
incompatible record checks
-
letrec/letrec* violation checks
-
compile-time format-string checks and compilation
-
unquote and unquote-splicing extension to zero+ subforms
-
various run-time library and code generation improvements
-
syntax-case performance improvements
-
improved bignum arithmetic speed
感觉后面记得比较流水账,没啥意思。