Hacker News new | ask | show | jobs
by bluejekyll 3397 days ago
And some languages are allowed to use FFI to make their impl faster. There's some rule about this that I don't understand, but oh well. It's all for fun, not serious.

But come on, now Rust can legitimately be called "faster than C" ;)

At least until the Clang C version is added... or maybe it will still be faster.

2 comments

>And some languages are allowed to use FFI to make their impl faster. There's some rule about this that I don't understand, but oh well. It's all for fun, not serious.

Actually it's pretty easy: if you can write a faster version in any language, given whatever is there in the language, even if it's c implemented standard library stuff, do it.

The implementations are not meant to be final -- people can contribute faster ones.

I suspect all languages without exception use some standard library functionality in at least a few of those sample programs, and most "standard" libraries aren't constrained to be self-hosting - so all of em use some native code, probably written in C or C++. I suspect that's true of rust too.

FFI is a fact of life. I can imagine it would be perverting the intent of the game if you explicitly used FFI to delegate the actual core of the benchmark program to C as opposed to using "standard" building blocks, but the distinciton is necessarily vague.

> I suspect that's true of rust too.

rustc uses LLVM and jemalloc (by default). Other than that, it is all Rust.