9front - general discussion about 9front
 help / color / mirror / Atom feed
From: boehm.igor@gmail.com
To: 9front@9front.org
Subject: Re: [9front] [PATCH] branchless assembly abs() and labs() for amd64
Date: Fri, 25 Dec 2020 19:28:44 +0100	[thread overview]
Message-ID: <3DDE1E483508802CAF9926EE01A0A112@gmail.com> (raw)
In-Reply-To: <C3BA78DCEE346F5F67FB233A0F16E847@eigenstate.org>

> Quoth Kemal <kemalinanc8@gmail.com>:
>> hello,
>> 
>> i remembered a method to do branchless abs.
>> can i send it as a patch?

Nice :-)

> more code is more work, especially with platform
> specific assembly. is there any real world program
> where this matters a lot?

On top of having quantitative data (i.e.  a microbenchmark as well as
something real like a benchmark suite) available that show the benefit,
it would also be interesting what the compiler generates for
abs()/labs() and juxtapose that to see how much savings in code size,
improvement in performance, etc. this can accomplish.

That way it is easier to make the trade-off between maintainability
burden vs. performance gain.



  reply	other threads:[~2020-12-25 18:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-25 16:36 Kemal
2020-12-25 18:13 ` ori
2020-12-25 18:28   ` boehm.igor [this message]
2020-12-25 22:30     ` Kemal
2020-12-26  1:38       ` ori
2020-12-26 14:12         ` Kemal

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=3DDE1E483508802CAF9926EE01A0A112@gmail.com \
    --to=boehm.igor@gmail.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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.
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).