From owner-freebsd-hackers@freebsd.org Sun Jan 6 22:06:18 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37ADF149D10A for ; Sun, 6 Jan 2019 22:06:18 +0000 (UTC) (envelope-from brian@aceshardware.com) Received: from mail.aceshardware.com (mail.aceshardware.com [52.52.37.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 367B993949; Sun, 6 Jan 2019 22:06:17 +0000 (UTC) (envelope-from brian@aceshardware.com) Received: from [10.0.0.102] (unknown [71.145.208.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.aceshardware.com (Postfix) with ESMTPSA id 3854D20130F; Sun, 6 Jan 2019 22:06:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aceshardware.com; s=dkim; t=1546812375; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f2Efj2THKW9dG84bSDUlWKFl0vWMKUmRDDv/iC5xk38=; b=Wbemmby50iVq2PQFLycAi46i7GP9XzZYstn1pQ30ibNdyEh2PzwN8ATdqxJdZ8lgxFWFNB AAiGALpqpLtoEfROHedzHphd/QjfGoi9g9urSCsooQ5+RYhf1vZ9ipfXrODBKyObMe/jxh 3P6ek4cZvvJ2rOyQpVSAuNCJVHz2gWTblfY3KUe75PtC4LOBmz7TrCUPfJeFGnpV56jUpU meRp3nB0k1BbEa2rnFRcOafdaD0GsbBLsTqkpnxxskILVcKEJAByMSWfmogGxS56zIpBMP nbLV9qY4aO1cKNIVRMzI9Q7HfWZ7fTQhz6CqHMZNnCbR2gpSdWnMGG33JCQXFw== Subject: Re: Speculative: Rust for base system components To: Alan Somers Cc: "freebsd-hackers@freebsd.org" References: <7d7bc47d-04cf-2f9b-00a3-e3d9d92b3623@aceshardware.com> <72922F2C-9D27-47AA-BB1C-2DA8589CF008@rpi.edu> <92bd5362-d898-aa12-8f3d-9fbe23f38e0c@aceshardware.com> <26325c0b-4960-7739-72aa-c31c4e0638d3@aceshardware.com> From: Brian Neal Message-ID: <20ad6ace-db43-7675-a6d3-813a71ac3a9a@aceshardware.com> Date: Sun, 6 Jan 2019 14:06:09 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:65.0) Gecko/20100101 Thunderbird/65.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 367B993949 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=aceshardware.com header.s=dkim header.b=Wbemmby5; dmarc=pass (policy=none) header.from=aceshardware.com X-Spamd-Result: default: False [-3.13 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[aceshardware.com:s=dkim]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(0.31)[0.315,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; MX_GOOD(-0.01)[cached: mail.aceshardware.com]; DKIM_TRACE(0.00)[aceshardware.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[aceshardware.com,none]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.64)[ipnet: 52.52.0.0/15(-1.84), asn: 16509(-1.25), country: US(-0.08)]; ASN(0.00)[asn:16509, ipnet:52.52.0.0/15, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 22:06:18 -0000 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