Additionally, if this was a more complex function that used other functions, those functions would also generally be fully partially evaluated at compile time.
It's the full power of Vau/Combiners/Fexprs with the expected runtime performance of Scheme!
---
# Partial Eval: Current Status
1. No longer *super* slow
2. Fixed most BigO algo problems (any naive traversal is exponential)
3. Otherwise, the implementation is slow (pure function, Chicken Scheme not built for it, mostly un-profiled and optimized, etc)
4. Compiles wraplevel=0 combs to a assert(false), but simple to implement.
5. Working through bugs - right now figuring out why some things don't partially evaluate as far as they should
---
# Partial Eval: Future
Allow type systems to be built using Vaus, like the type-systems-as-macros paper (https://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf).
This type system could pass down type hints to the partial evaluator, enabling:
2. Compiletime: Drop optimizing compiled version if wraplevel=0
3. Compiletime: Drop emitting constant code for if wraplevel=1
4. Runtime: Eliminate branch on wrap level
5. Runtime: Eliminate other typechecks for builtin functions
---
# Introduction
Here's some test code:
.run_container[
; Of course
(println "Hello World")
; Just print 3
(println "Math workssss:" (+ 1 2 4))
]
--
.rerun_container[
]
---
# Another slideo
boro