Building a Zero-Dependency AST Profiler in Pure Coni
Performance optimization is critical, but profiling dynamic languages often comes with a massive caveat: runtime overhead. When dealing with interpreters, developers usually resort to mocking or wrapping functions dynamically at runtime using constructs like with-redefs.
However, when you need your profiler to work flawlessly in both a Native interpreter and Ahead-Of-Time (AOT) compiled WebAssembly environments, dynamic runtime rebinding simply isn’t an option. AOT compilers resolve functions statically.
So, how do you profile an application without modifying the compiler itself or suffering runtime penalties?

