Login
You're viewing the discuss.systems public feed.
  • Oct 14, 2026, 9:17 PM

    @dysfun @mcc oh my god what is going on with racket? Yeah using chez scheme takes 0.36s (of which 0.3 is spinning up the chez runtime), but using racket takes 7.68s


    time idris2 hello.idr -o program
    idris2 hello.idr -o program 0.36s user 0.08s system 96% cpu 0.452 total

    time idris2 --cg racket hello.idr -o program
    idris2 --cg racket hello.idr -o program 7.68s user 0.62s system 96% cpu 8.560 total
    💬 1🔄 1⭐ 0

Replies

  • Oct 14, 2026, 9:19 PM

    @Andrev @mcc huh? isn't that just running the racket backend under chez? why is the backend for racket so much slower under chez?!

    💬 1🔄 0⭐ 0
  • Oct 14, 2026, 9:22 PM

    @dysfun @mcc No clue, I don’t remember being such a big difference in the past. This must have happened in the last year or two. I’m sure this is something we can ask the racket people about, we’re probably passing incorrect arguments to racket (or overly conservative ones)

    💬 1🔄 0⭐ 0
  • Oct 14, 2026, 9:26 PM

    @Andrev @mcc the only thing i remember was some comment a couple of years back (i think it was edwin?) saying he had to change the gc options to make performance better?

    but like 2 minutes to compile hello world is clearly beyond the pale. even idris1 didn't take that long!

    💬 1🔄 0⭐ 0
  • Oct 14, 2026, 9:31 PM

    @dysfun @mcc

    Here is what I know of what’s going on for chez cheme, and how that relates to other codegens:

    • The compiler being a scheme program needs to start the scheme runtime. Chez sheme takes about 300ms to bootup, so every invocation of the compiler takes at least that much
    • typechecking of such programs is essentially instantaneous
    • compilation takes a while. we generate scheme code and then we rely on chez to compile it and optimise it.

    once we emit scheme code we call racket or chezscheme and have them compile and optimise the executable, this can take a while especially when linking large projects.

    For a hello world this should be fast, no idea why racket is so slow. Chezscheme performs as expected (0.36s) where 0.3 is taken by booting up the runtime, and 0.06 by compiling the executable

    💬 1🔄 0⭐ 1
  • Oct 14, 2026, 9:39 PM

    @Andrev @mcc yes, sorry, what i mean is selecting the racket codegen is still running it under chez, no? just like i can select the javascript codegen and it's still running under chez? i guess it has to call racket afterwards?

    but that's clearly a lot slower. and apparently on the scale of compiling hello world entirely on racket, that's 2 minutes.

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0