Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jan 2019 14:06:09 -0800
From:      Brian Neal <brian@aceshardware.com>
To:        Alan Somers <asomers@freebsd.org>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Speculative: Rust for base system components
Message-ID:  <20ad6ace-db43-7675-a6d3-813a71ac3a9a@aceshardware.com>
In-Reply-To: <CAOtMX2h-BGJZA-mEKgK8WPPhv4=SGDi%2BNWaKchw0u3FcDU5nLA@mail.gmail.com>
References:  <ca76e5f7-6e59-bd67-144a-90ad66f0252e@metricspace.net> <7d7bc47d-04cf-2f9b-00a3-e3d9d92b3623@aceshardware.com> <72922F2C-9D27-47AA-BB1C-2DA8589CF008@rpi.edu> <92bd5362-d898-aa12-8f3d-9fbe23f38e0c@aceshardware.com> <CAOtMX2gPrpO2O70pnwpU80bXMXo6LB9PCkU3bYw2ToMMnhf%2Bww@mail.gmail.com> <26325c0b-4960-7739-72aa-c31c4e0638d3@aceshardware.com> <CAOtMX2jOeAZfpyH1S1N1euAQQZe00nA9JQNjY2qnRB%2BczS9O2g@mail.gmail.com> <e94efcba-3fd3-7d23-cc4a-bcc0af5a8851@aceshardware.com> <CAOtMX2h-BGJZA-mEKgK8WPPhv4=SGDi%2BNWaKchw0u3FcDU5nLA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm glad you mentioned build times, because I did, in fact, measure them...

 > Compiler              Flags                 Inst. Count     Build Time
 > ======================================================================
 > clang 7.0.0           none                            33         296ms
 >                        -O3                            23         341ms
 > rustc 1.31.0          none                           110         606ms
 >                        -C opt-level=3                 67         643ms
 > gcc 8.2               none                            37         211ms
 >                        -O2                            24         249ms
 >                        -O3                          119*         206ms


On 1/6/2019 10:01 AM, Alan Somers wrote:
> But it's not a like-for-like comparison.  Rust eliminates dead code at
> a later stage.  If you want to compare the efficiency of generated
> code, you need to exclude the dead code that will be eliminated by
> LTO.  And you shouldn't be counting the labels for either language,
> because they don't affect the machine code.  If you want to compare
> build times, then you should actually measure build times.
> -Alan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20ad6ace-db43-7675-a6d3-813a71ac3a9a>