Date: Mon, 31 Dec 2018 19:26:28 -0500 From: "Garance A Drosehn" <gad@FreeBSD.org> To: "Alan Somers" <asomers@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Speculative: Rust for base system components Message-ID: <2C39D05E-E855-4FCE-82CF-83EA4AE9F84A@FreeBSD.org> In-Reply-To: <5B476178-4D09-486F-AC58-47CB04965335@FreeBSD.org> References: <ca76e5f7-6e59-bd67-144a-90ad66f0252e@metricspace.net> <CAG6CVpV0kxupmkhHiYBT05Yfst6uNtbUyYUzG95Zwcbk9F3K0Q@mail.gmail.com> <CAOtMX2gO5yMxLpZYxmfG3DFhRnZna-mQBOGXe=OJOzP4QfpBmg@mail.gmail.com> <5B476178-4D09-486F-AC58-47CB04965335@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 31 Dec 2018, at 17:44, Garance A Drosehn wrote: >> On Mon, Dec 31, 2018 at 12:17 AM Conrad Meyer <cem@freebsd.org> wrote: >> >> Do you have any data to support the claim of slow build times? >> I know it's very hard to do an apples-to-apples comparison of build >> times between different languages, but I would be interested to see >> somebody try. > > I know that it takes a very long time to build rust (the compiler > itself) on my mac, and FreeBSD's buildworld always starts out by > building the compilers that it needs. So adding rust to the base > system is going to cause an immediate and noticeable increase in > the time used by buildworld. > On 31 Dec 2018, at 9:21, Igor Mozolevsky wrote: >> >> Does the generated code size increase or decrease and does the >> data-path get longer or shorter with switch from C to Rust with >> all the "great features" of Rust? Are there any metrics for >> these? If a CPU cache gets trashed repeatedly or data takes >> massive detours that would be a significant downside, wouldn't it? > > I've been somewhat interested in Rust for awhile, although I haven't > had the time to do much of anything with it. Part of the answer to > your questions will depend on how good the programmers are. There's two questions wrt performance. One is how long it takes to compile some program, and then the other is how fast the code is which is produced by the compiler. A note on both of those: Rust has the notion of "building for release", in which case the compile-time step takes *much* longer, but all that extra time goes into producing better code in the resulting program. So if you think the compiler is fast but that it's generating very slow programs, then it might be that you're not doing "a release build". There's one program written in rust which I use a lot, which is called 'ripgrep' (or 'rg' for short). It's one of the few programs which I install via pre-compiled pkgs, because I don't want to wait for all the time it takes to compile a release-build. But I'm very happy with how fast the program runs. -- Garance Alistair Drosehn = drosih@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2C39D05E-E855-4FCE-82CF-83EA4AE9F84A>