Hello, I have a decent cpu, recent Ryzen with 8 cores, I tried to compile the example todo app guild compile-wasm todo.scm -o todo.wasm
and it takes 6 seconds. This I think it’s too much, at least for me, it makes it hard to develop apps without a quick feedback loop. Is there any way or plans to make it quicker? Thanks
We plan to do an optimization pass on the compiler when we have more of the essential components of the system implemented because we also think compile times are too long. Keep in mind that Hoot is a whole program compiler, though. Every time you compile a program, you are compiling not just that program, but the entire dependency graph of modules that are used by that program. This includes a complex macro expansion pass where, due to the presence of procedural macros, modules are interpreted during compilation, a tree shaking pass to remove unused code to minimize the binary size, all of Guile’s standard optimization passes such as partial evaluation, type inference, contification, common subexpression elimination, and even some low-level Wasm passes to tweak the final binary. There’s simply a lot more to do than with separate compilation like in Guile where each module is compiled on its own. But we’re gonna see what we can do to speed things up!
Would it make sense to have a development mode that left out some of that stuff?
Yes, we’ve discussed this, as well. Once we have a real interpreter working in the browser it will become more clear what a developer mode should contain.