git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] bswap.h: drop unaligned loads

From
Jeff King <peff@peff.net>
Date
Sep 25, 2020, 09:09 UTC
Message-ID
<20200925090906.GA66146@coredump.intra.peff.net>
In-Reply-To
<CAPUEspjpUeaqCCuBJpQLSTv=C_P4f5h22HoTPm9+9rB7k0NkaQ@mail.gmail.com>
On Fri, Sep 25, 2020 at 02:05:09AM -0700, Carlo Arenas wrote:
Show 6 quoted lines
> > >   [stock]
> > >   Benchmark #1: t/helper/test-tool sha1 <foo.rand
> > >     Time (mean ± σ):      6.638 s ±  0.081 s    [User: 6.269 s, System: 0.368 s]
> > >     Range (min … max):    6.550 s …  6.841 s    10 runs
> 
> slightly offtopic but what generates this nicely formatted output?
It's this:
  https://github.com/sharkdp/hyperfine

It will actually run both versions and compare them, but it's a little more involved to set up (since you have to do a build step in between).

Show 7 quoted lines
> > I cannot speak for s390, since I have never owned one
> 
> I happen to be lucky enough to have access to one (RHEL 8.2/z15, gcc
> 8.3.1) and seems (third consecutive run):
> 
> stock: user: 7.555s, system: 1.191s
> -DNO_UNALIGNED_LOADS: user: 7.561s, system: 1.189s

Thanks. That's not too surprising. gcc 8 seems to be able to optimize both versions to the same thing (though I have no idea if s390 has a bswap instruction).

-Peff
Previous: Carlo ArenasNext: Thomas Guyot
Message 7 of 9 in “drop unaligned loads”
  1. 0/2 drop unaligned loadsJeff King, Sep 24, 2020
  2. 1/2 bswap.h: drop unaligned loadsJeff King, Sep 24, 2020
  3. René ScharfeSep 24, 2020
  4. Jeff KingSep 25, 2020
  5. brian m. carlsonSep 25, 2020
  6. Carlo ArenasSep 25, 2020
  7. Jeff KingSep 25, 2020
  8. Thomas GuyotSep 25, 2020
  9. 2/2 Revert "fast-export: use local array to store anonymized oid"Jeff King, Sep 24, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.