4 ms·
We get a lot out of having static classes and methods that can't change dynamically. This allows us to use the selector-based row displacement technique for bui
by floitsch 5y ago
We get a lot out of having static classes and methods that can't change dynamically. This allows us to use the selector-based row displacement technique for building a compact method dispatch table. (See https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.29.8713&rep=rep1&type=pdf https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.29...)
Many small decisions help keeping the system fast. The memory layout, the bytecodes, the FFI interface, ...
Separating the compilation process from the running process obviously also helps. It gives us the option to do slower optimizations before-hand, and not pay for them at runtime. (Independent of the fact that the ESP32 wouldn't be able to do big optimizations anyway).
This is actually an area we haven't really spent too much time on yet: optimizations. The current compiler doesn't even do inlining yet. The speed of Toit was never really a problem, and we preferred to spend time elsewhere. Eventually, we will definitely do more there again.