mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Damian McGuckin <>
Subject: [musl] scalbn.c and friends
Date: Mon, 24 Jul 2023 10:20:56 +1000 (AEST)	[thread overview]
Message-ID: <> (raw)

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

                 reply	other threads:[~2023-07-24  0:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).