]> Sergey Matveev's repositories - public-inbox.git/commit
git: reduce stat buffer storage overhead
authorEric Wong <e@yhbt.net>
Sun, 5 Apr 2020 07:53:49 +0000 (07:53 +0000)
committerEric Wong <e@yhbt.net>
Sun, 5 Apr 2020 22:06:23 +0000 (22:06 +0000)
commitb9cc3985078111b1fb38de920fd3b7afe3eec542
treea469c00f37583d31857a011e3828b7ff430032c3
parent1e5d704f1234ded472b800e42bedb5579780296e
git: reduce stat buffer storage overhead

The stat() array is a whopping 480 bytes (on x86-64, Perl 5.28),
while the new packed representation of two 64-bit doubles as a
scalar is "only" 56 bytes.  This can add up when there's many
inboxes.  Just use a string comparison on the packed
representation.

Some 32-bit Perl builds (IIRC OpenBSD) lack quad support, so
doubles were chosen for pack() portability.
lib/PublicInbox/Git.pm