Closed tiancaiamao closed 3 years ago
shen code (f x) is translated to cora code as ((ns2-value f) x) Now in the compiler, (ns2-value f) is generated as ($global 2 f) bytecode And in the code generator, optimize those call pattern:
(call ($global ns XX) ...) (tailapply ($global ns XX) ...)
If XX is known primitive, use PrimXX instead of __e.Call(PrimNS2Value(XX), ...)
Before this change, run the shen test suite takes 26s, and now it takes 12s
shen code (f x) is translated to cora code as ((ns2-value f) x) Now in the compiler, (ns2-value f) is generated as ($global 2 f) bytecode And in the code generator, optimize those call pattern:
If XX is known primitive, use PrimXX instead of __e.Call(PrimNS2Value(XX), ...)
Before this change, run the shen test suite takes 26s, and now it takes 12s