"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
"Omar Polo" <op@omarpolo.com>
Subject:
Re: avoid one memcpy in got-read-pack enumerate_tree()
To:
Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 24 Feb 2026 23:48:08 +0100

Download raw body.

Thread
Stefan Sperling <stsp@stsp.name> wrote:
> Avoid one per tree-entry memcpy() in got-read-pack enumerate_tree().
> 
> This is called per tree entry to it's being called a lot.
> Anything we can skip doing here should be a worthwile change.
> 
> I hadn't sent this easlier since I had it sitting on top of the idset
> changes which have just been committed.
> 
> The idea is that we can pass pte->id directly to look it up in an idset.
> The current API forces us to copy the hash into a got_object_id first.
> 
> ok?

I haven't benchmarked it but it's an hot path and every instruction
saved is nice.

ok op@