From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id BD0C4241AA for ; Wed, 17 Apr 2024 03:25:10 +0200 (CEST) Received: (qmail 7632 invoked by uid 550); 17 Apr 2024 01:25:03 -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 7588 invoked from network); 17 Apr 2024 01:25:03 -0000 X-Virus-Scanned: SPAM Filter at disroot.org Date: Wed, 17 Apr 2024 01:25:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1713317095; bh=42q89e4luhjpPgXnEidrpi4ib21HGMPGc0Gqf8ia7vw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=SfAPvdAU3innVfIMp72J1DZChFb2R0+7Y6GTE7r7MkK8NN3HE4Btx4ixwEhkn/B/T bk7nm6rZXbNkADSho+oAgkpYoKoIiGBAlXjBNX+y+2aZ4Nyw6b/EV4n4LMCPN9/9ac 8ERmfd08HLjM3a5yi4WGcmXfLjM4nE0y3ZYAQqAz9Tc0ASONf+NjFnw7W4bmS0RDkY HVWnKOZGLVWqEKpy94geUI5t2VeDaOhUvDa7kcDbcabi+BtcNH6qIGOqL1pjrBtkg1 zbnpEwxrzZqqF1pFiV3KO7OxEXcNmsPOvpTuoojeWjMhECgcHSGyaA60Hfygz2Zlq8 tRNaepqh0A4rg== From: NRK To: musl@lists.openwall.com Cc: Viktor Reznov Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [musl] [PATCH] Decreasing the number of divisions > I played around with this change on godbolt: https://godbolt.org/z/9PoGK9zae You're looking at clang -O3, if you use gcc -Os (usual for musl users/distros) you'll notice that gcc actually ends up emitting a div instruction, which are known to be slow. But I don't think trying to optimize around gcc's bad codegen is the right move. It's better to just not use -Os with gcc. Which musl already does since commit b90841e25832. - NRK