From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9465 invoked from network); 15 Aug 2021 15:52:29 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 15 Aug 2021 15:52:29 -0000 Received: (qmail 27877 invoked by uid 550); 15 Aug 2021 15:52:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 27854 invoked from network); 15 Aug 2021 15:52:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dereferenced.org; s=mailbun; t=1629042734; bh=KutCJmsK6Q4x7qMt74tHSgc4CudikdtyofRw8do/wEc=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=aOsf61lBrZLVzMMLAollnFh+BA99vYs18QZse2qxNm/X81AejTmfMD9kMvCKqDO0Q UmeKUsyJ0c5SQZHIOve74dGC6d93SKn6yi27b37thLcAORbWJn8tZmGrWFoCvR4A5W ovVyWNNV6D3Pjnc2D0OhfBXpgP3/R2amv8QfKtxWKNqedta3kxv/QZxfuCm+0HOnvY Qc+ZxhvRccVYMPqeqIe+Cz3z4SO3dGHRlzhSbdW0ysKr0w2trIKvLRahwoIcMNMfXE ZnhDSKwakmzq4YRLdnbKdgA//8iDmuEQ0LkGpVmDsPkD6jePcecqrNHX+iwkszVcPa JhM++jVQsgtvw== Date: Sun, 15 Aug 2021 10:52:13 -0500 (CDT) From: Ariadne Conill To: musl@lists.openwall.com cc: Szabolcs Nagy In-Reply-To: <1F3569BD7D6E45889B7518DC9BE5004B@H270> Message-ID: References: <0C6AAAD55DA44C6189B2FF4F5FB2C3E7@H270> <20210810213455.GB37904@port70.net> <20210814234612.GH37904@port70.net> <367A4018B58A4E308E2A95404362CBFB@H270> <20210815145614.GI37904@port70.net> <1F3569BD7D6E45889B7518DC9BE5004B@H270> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: Re: [musl] [PATCH #2] Properly simplified nextafter() Hi, On Sun, 15 Aug 2021, Stefan Kanthak wrote: > Szabolcs Nagy wrote: > >> * Stefan Kanthak [2021-08-15 09:04:55 +0200]: >>> Szabolcs Nagy wrote: >>>> you should benchmark, but the second best is to look >>>> at the longest dependency chain in the hot path and >>>> add up the instruction latencies. >>> >>> 1 billion calls to nextafter(), with random from, and to either 0 or +INF: >>> run 1 against glibc, 8.58 ns/call >>> run 2 against musl original, 3.59 >>> run 3 against musl patched, 0.52 >>> run 4 the pure floating-point variant from 0.72 >>> my initial post in this thread, >>> run 5 the assembly variant I posted. 0.28 ns/call >> >> thanks for the numbers. it's not the best measurment > > IF YOU DON'T LIKE IT, PERFORM YOUR OWN MEASUREMENT! > >> but shows some interesting effects. > > It clearly shows that musl's current implementation SUCKS, at least > on AMD64. I would rather have an implementation that is 3.59 ns/call and is maintained by somebody who is actually pleasant to talk to. In the grand scheme of things 3.59 ns/call, and even 8.58 ns/call are not a big deal for a function like nextafter(). If musl does wind up merging this, I intend to revert that merge in Alpine because I cannot trust the correctness of any code written by somebody with this attitude. Ariadne