Speculative: Rust for base system components

Eric McCorkle eric at metricspace.net
Mon Dec 31 18:19:20 UTC 2018


On 12/31/18 12:36 PM, Enji Cooper wrote:

> Rust is still a young language, but it has a number of benefits in terms of:
> i. Being able to scale past JIT python. This fact doesn’t matter on workstations/servers, but it definitely matters on the low end with embedded systems and the upper end with distributed systems at scale (there’s a reason why a number of critical services at my previous longterm employment were written in C++, not python. Some argue Rust can outperform C/C++ [2]. C++ I can see (managed pointers were about an order of magnitude less performant in a microbenchmark I wrote for grabbing the time in the Linux kernel vs malloc in C using llvm36). However, outperforming C is up for debate.

In terms of outperforming C++, you can outrun it on anything that
involves virtual calls or runtime type information.  C++ compilers have
gotten pretty good at optimizing this stuff, but that's all an
approximation of just not doing it in the first place.

In terms of C, I think the more accurate notion is that you converge to
C-like performance over time.  There's not a lot of opportunity to pull
out ahead of C in terms of performance, afterall, at least in purely
sequential code.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20181231/2989e175/attachment.sig>


More information about the freebsd-hackers mailing list