3 ms·
Pretty impressed with the performance of the cranelift and singlepass backends. They've come a long way. I am wondering why the LLVM backend takes so long to c
by mastax 5y ago
Pretty impressed with the performance of the cranelift and singlepass backends. They've come a long way.
I am wondering why the LLVM backend takes so long to compile the TiDb Wasm. Presumably it doesn't take >3 days to compile TiDb from source with llgo and rustc. Why would compiling it to Wasm first make it take way longer to compile than from source?
- syrusakbary 5y agoLLVM compilation times can be for sure improved further, although to be honest we haven't focused on it yet (as this long compilation times are more like an edge case atm). In general, compiling to Wasm gives you the universality over a chipset or OS. Imagine that you compile TiDB today to Wasm, tomorrow you will be able to run it in chipsets or platforms where it was not available today (RISC-V, for example), without the need of installing a toolchain to rebuild the binary... just with a small runtime like Wasmer.