Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2019 08:50:10 -0800
From:      Brian Neal <brian@aceshardware.com>
To:        Alejandro Martinez <unledev@gmail.com>
Cc:        freebsd-hackers@freebsd.org, Garance A Drosehn <drosih@rpi.edu>
Subject:   Re: Speculative: Rust for base system components
Message-ID:  <E0CA1E33-C096-44DC-B494-DE3B87237E57@aceshardware.com>
In-Reply-To: <CAFwFPkziF%2BEvZ2fEv1fErfmDujPm9UhxvoYUBoCo-%2BtjXtBWmw@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> <CAFwFPkziF%2BEvZ2fEv1fErfmDujPm9UhxvoYUBoCo-%2BtjXtBWmw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Sure!

Just go to http://godbolt.org/ and type a small program in each language, enter the appropriate compilation flags and compare the output. The function I used took a count as a parameter, iterated through the count, summed up odd numbers and returned the sum.

Cheers,

-Brian

Sent from my iPhone

> On Jan 4, 2019, at 3:02 AM, Alejandro Martinez <unledev@gmail.com> wrote:
> 
> Hi Brian,
> 
>> On Tue, Jan 1, 2019 at 7:02 AM Brian Neal <brian@aceshardware.com> wrote:
>> 
>> It was a debug build with no optimization for either compiler. But we
>> can easily run a variety of settings for comparison:
>> 
>> 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
>> 
>> * With -O3, gcc unrolled and vectorized the loop. The other compilers
>> did not emit vectorized code at any of the standard optimization levels.
>> 
>> So, essentially, double the build time and ~3 times the code for the
>> same logic.
> 
> Can you share your exact tests so others can replicate?
> 
> Thanks,
>  Alex
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"

[-- Attachment #2 --]
0	*H
010
	`He0	*H
00נ@b%^"10
	*H
0:10	UUS10U
	IdenTrust10UTrustID CA A120
180314183331Z
190314183331Z01/0-U&Verified Email: brian@aceshardware.com1%0#	*H
	brian@aceshardware.com1/0-
	&,dA01427D0000016225C9E54C000172F10"0
	*H
0
r_=`{:Y0
O1%8bx4ypw@?Y`a{C>%&^Ί\S␞E[V	ɍ<SJYY蒑~^`MQ	 ɥmM_eϱ*}'V)chLalٳpݱI
E^m`5xu̝a|,$e})쓛d?}΃T{Iꮅj5_(lx)00U0+x0v00+0$http://commercial.ocsp.identrust.com0B+06http://validation.identrust.com/certs/trustidcaa12.p7c0U#0si5u̠{2kB0	U00,U #00`H/0
0J+>https://secure.identrust.com/certificates/policy/ts/index.html0+0This TrustID Certificate has been issued in accordance with 
IdenTrust's TrustID Certificate Policy found at https://secure.identrust.com/certificates/policy/ts/index.html0EU>0<0:864http://validation.identrust.com/crl/trustidcaa12.crl0!U0brian@aceshardware.com0U
3')$ֹUJp|0U%0++0
	*H
lMXySVdXy0`윋r65]89?V0bz3N7Jq<2!L`{(+NR25	edk`6cr_)j%ǂ50rCڤR}ShYJ9V\AܲUmhi)^|ĩAK`c$;p@ײ,7{		%V
Bт[?S(#CC2szø؎2F.xt100N0:10	UUS10U
	IdenTrust10UTrustID CA A12@b%^"10
	`He)0	*H
	1	*H
0	*H
	1
190104165010Z0/	*H
	1" ܎0cж"&%';dVu0]	+71P0N0:10	UUS10U
	IdenTrust10UTrustID CA A12@b%^"10_*H
	1PN0:10	UUS10U
	IdenTrust10UTrustID CA A12@b%^"10
	*H
wDQkAAQO&zŸPVV\bmwSjՙ2akPdNC	SAxT_GͲIMeƟRgBWsyqrFl.&F
.zY+YuٕTy|6tHLl8͐G#tז)
Vg	롼ԿxN,=Q{
j$J_P7݉

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0CA1E33-C096-44DC-B494-DE3B87237E57>