git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2 5/6] bswap.h: Remove optimized x86 version of bswap32/64
Date: Tue, 15 Jul 2025 21:02:29 +0200	[thread overview]
Message-ID: <20250715190229.ed-A7kgh@breakpoint.cc> (raw)
In-Reply-To: <e00dff7e-1920-45b6-85d2-49e6a1218882@app.fastmail.com>

On 2025-06-26 17:55:43 [+0200], Kristoffer Haugsbakk wrote:
> On Thu, Jun 12, 2025, at 00:14, Sebastian Andrzej Siewior wrote:
> > On x86 the bswap32/64 macro is implemenated based on the x86 opcode wich
> 
> s/implemenated/implemented/
> 
> s/wich/which/
> 
> > performs the required shifting in just one opcode.
> > The other CPUs fallback to the generic shifting as implemented by
> > default_swab32() and default_bswap64() if needed.
> >
> > I've been looking at how good a compiler is at recognizing the default
> > shift and emitting an optimized operation:
> > - x86, arm64 msvc v19.20
> >   default_swab32() optimized
> >   default_bswap64() shifts
> >   _byteswap_uint64() otimized
> >
> > - x86, arm64 msvc v19.37
> >   default_swab32() optimized
> >   default_bswap64() optimized
> >   _byteswap_uint64() otimized
> 
> Is it supposed to say `otimized` twice?

Nope. Fixed. Thank you.

Sebastian

  reply	other threads:[~2025-07-15 19:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 22:14 [PATCH v2 0/6] bswap.h: Rework ntohl handling Sebastian Andrzej Siewior
2025-06-11 22:14 ` [PATCH v2 1/6] Revert "bswap.h: add support for built-in bswap functions" Sebastian Andrzej Siewior
2025-06-12 20:04   ` Junio C Hamano
2025-06-11 22:14 ` [PATCH v2 2/6] bswap.h: Add support for __BYTE_ORDER__ Sebastian Andrzej Siewior
2025-06-12  0:24   ` brian m. carlson
2025-06-12  0:43     ` Collin Funk
2025-06-12 20:10   ` Junio C Hamano
2025-06-11 22:14 ` [PATCH v2 3/6] bswap.h: Define GIT_LITTLE_ENDIAN on msvc as little endian Sebastian Andrzej Siewior
2025-06-12 20:11   ` Junio C Hamano
2025-06-11 22:14 ` [PATCH v2 4/6] bswap.h: Always overwrite ntohl/ ntohll macros Sebastian Andrzej Siewior
2025-06-12  0:14   ` brian m. carlson
2025-06-12 20:16     ` Junio C Hamano
2025-06-11 22:14 ` [PATCH v2 5/6] bswap.h: Remove optimized x86 version of bswap32/64 Sebastian Andrzej Siewior
2025-06-26 15:55   ` Kristoffer Haugsbakk
2025-07-15 19:02     ` Sebastian Andrzej Siewior [this message]
2025-06-11 22:14 ` [PATCH v2 5/6] bswap: " Sebastian Andrzej Siewior
2025-06-11 22:14 ` [PATCH v2 6/6] bswap.h: Provide a built-in based version of bswap32/64 if possible Sebastian Andrzej Siewior
2025-06-12 20:21 ` [PATCH v2 0/6] bswap.h: Rework ntohl handling Junio C Hamano
2025-07-07 22:43 ` Junio C Hamano
2025-07-09  6:04   ` Sebastian Andrzej Siewior

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=20250715190229.ed-A7kgh@breakpoint.cc \
    --to=sebastian@breakpoint.cc \
    --cc=git@vger.kernel.org \
    --cc=kristofferhaugsbakk@fastmail.com \
    /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).