← Back to context

Comment by dontlaugh

6 days ago

Fil-C is slow.

There is no C or C++ memory safe compiler with acceptable performance for kernels, rendering, games, etc. For that you need Rust.

The future includes Fil-C for legacy code that isn’t performance sensitive and Rust for new code that is.

No, Rust is awful for game development. It's not really what it was intended for. For one, all the graphics API are in C, so you would have to use unsafe FFI basically everywhere.

How slow? In some contexts, the trade-off might be acceptable. From what I've seen in pizlonator's tweets, in some cases the difference in speed didn't seem drastic to me.

  • Yeah, I would happily run a bunch of my network services in this. I have loads of services that are public-facing doing a lot of complex parsing and rule evaluation and are mostly idle. For example my whole mailserver stack could probably benefit from this. My few messages an hour can run 2x slower. Maybe I would leave dovecot native since the attack surface before authentication is much lower and the performance difference would be more noticeable (mostly for things like searches).

    • You may be aware that one of the things Bernstein is famous for is revolutionizing mailserver security.

I imagine Apt is usually IO constrained?

  • That's my guess, yeah

    Also, Fil-C's overheads are the lowest for programs that are pushing primitive bits around.

    Fil-C's overheads are the highest for programs that chase pointers.

    I'm guessing the CPU bound bits of apt (if there are any) are more of the former