3 comments

  • dlcarrier 3 hours ago

    For the same source and libraries, whatever time spent compiling ahead of time will need to be spent JITting.

    C can static compile pretty fast, unless you have everything spread out over a million files and a bunch of libraries you're not really using. If the latter is the case, it'll run slow with a JIT compiler, too.

  • bluGill 6 hours ago

    Your typical helloWorld.c is several hundred thousand lines of code - most of that is things like "#include <stdio.h>" which gcc has to parse the whole thing even though wc only shows the program is less than 10 lines.

    We can make Gcc much faster despite the above. However your code will be slow. Each optimization adds a little more time. Even at zero optimization the compiler is still doing things to not generate stupid code. Gcc is extremely complex, and they are often willing to compromise runtime performance for either faster code, or easier maintainability - the right compromise for them, but it means the compiler is slower than it could be.

  • tristenharr 6 hours ago

    Thinking about this as I continue working on Logos language prepping for our 0.10.0 release, finished our copy-patch JIT that does hot-tiering and found myself wondering why I was going to all the trouble to native tier with a big game of compile to Logos Lang -> JIT to either my Bytecode language or Rust for compiled -> GCC -> WASM

    So I'm writing a WASM JIT, and I'm wondering why things never got to that point? Is it just beyond human comprehension? (Don't get me wrong here, I would not be writing something Jitting to WASM without AI, and maybe it's these types of projects that simply weren't feasible or something to consider pre-AI unless you were very rich and very bored.)