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

Re: Performance (self-compiled vs. distributed)

From
D. Ben Knoble <ben.knoble@gmail.com>
Date
Sep 4, 2025, 14:05 UTC
Message-ID
<CALnO6CCEF75uriogAEd5LfORJ-m9OmDcF7ubu-U_xLWwxfZWTQ@mail.gmail.com>
In-Reply-To
<CALnO6CA3FkiOeF4w1TUf9S_UDTG_1iRxjEZcAkfrL_eqY+P26w@mail.gmail.com>
On Wed, Sep 3, 2025 at 4:31 PM D. Ben Knoble <ben.knoble@gmail.com> wrote:
Show 24 quoted lines
>
> I have an installation of Git at /usr/local/bin/git managed by
> Homebrew. I'm also tinkering with building my own Git (+ patches) to
> experiment with new features. Today I used "make install …" to get
> that in ~/bin/git, but I'm noticing some performance problems. My
> shell prompt started coming back slower, especially in a large
> monorepo.
>
> For example, inside said monorepo (apologies in advance; output is on
> a computer I can't easily copy from):
>
>     hyperfine -Ni -w10 {/usr/local,$HOME}/bin/git
>     …
>     /usr/local/bin/git ran 4.99 +/- 1.69 times faster than ~/bin/git
>
> The difference is 22ms +/- 6.5ms (15.3ms–56.3ms) compared to 109.7ms
> +/- 17.8ms (91.1ms–159.9ms).
>
> My build recipe was
>
>     export DEVELOPER=1
>     export XML_CATALOG_FILES=/usr/local/etc/xml/catalog
>     make -j "$(nproc)" all doc
>     make install install-doc install-html

Interesting. It was suggested off-list that I should try building with CFLAGS=-Oz, which I'm having some trouble propagating (with V=1, I see some initial files built with -Oz and then later some with -O2??).

But on my other (non-corporate-managed) machine, I see almost no timing difference between a built Git and a Homebrew-installed Git. So I wonder if the corporate binary sniffer is causing problems…

-- 
D. Ben Knoble
Previous: D. Ben KnobleNext: Ben Knoble
Message 2 of 3 in “Performance (self-compiled vs. distributed)”
  1. D. Ben KnobleSep 3, 2025
  2. D. Ben KnobleSep 4, 2025
  3. Ben KnobleSep 4, 2025

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.