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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3109 invoked from network); 24 Jul 2023 00:21:17 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 24 Jul 2023 00:21:17 -0000 Received: (qmail 22001 invoked by uid 550); 24 Jul 2023 00:21:13 -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 21963 invoked from network); 24 Jul 2023 00:21:12 -0000 Date: Mon, 24 Jul 2023 10:20:56 +1000 (AEST) From: Damian McGuckin To: musl@lists.openwall.com Message-ID: <965ad6e8-c621-ad80-7926-1fb0c3e3f497@esi.com.au> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Subject: [musl] scalbn.c and friends Probably more an FYI only: I took some of the logic from an unrelated task to make a change to the code which involved biasing the exponent a little earlier than it is done currently for the case of a highly negative 2nd argument. Using Godbolt, and -O3, the lines of assembler dropped somewhat for the newer code CPU/Compiler OLD => NEW ARM gcc 13 47 -> 36 Power64 gcc 13 50 -> 42 X86 gcc 13 42 -> 35 Performance with my test machine, GCC 11 on X86, remains the same. So no speed gain. Not that it is doing much computation. I assume that it is not worth touching this routine. But the drop in LOC was interesting. Probably just means that optimizing compilers are getting better which is not news to anybody - Damian