# Re: Git and GCC

6 messages from 2007-12-08 to 2007-12-15. Participants: J.C. Pizarro, Johannes Schindelin, Joe Buck, Marco Costalba, Daniel Berlin, Nix.
Thread: https://gitlist.dev/t/11185

## J.C. Pizarro, 2007-12-08 02:21

Subject: Re: Git and GCC
Message-ID: <998d0e4a0712071821o520a75c4lbcaae92256071f48@mail.gmail.com>
URL: https://gitlist.dev/e/998d0e4a0712071821o520a75c4lbcaae92256071f48%40mail.gmail.com

```
On 2007/12/07, "Linus Torvalds" <torvalds@linux-foundation.org> wrote:
> On Fri, 7 Dec 2007, David Miller wrote:
> >
> > Also I could end up being performance limited by SHA, it's not very
> > well tuned on Sparc.  It's been on my TODO list to code up the crypto
> > unit support for Niagara-2 in the kernel, then work with Herbert Xu on
> > the userland interfaces to take advantage of that in things like
> > libssl.  Even a better C/asm version would probably improve GIT
> > performance a bit.
>
> I doubt yu can use the hardware support. Kernel-only hw support is
> inherently broken for any sane user-space usage, the setup costs are just
> way way too high. To be useful, crypto engines need to support direct user
> space access (ie a regular instruction, with all state being held in
> normal registers that get saved/restored by the kernel).
>
> > Is SHA a significant portion of the compute during these repacks?
> > I should run oprofile...
>
> SHA1 is almost totally insignificant on x86. It hardly shows up. But we
> have a good optimized version there.

If SHA1 is slow then why dont he contribute adding Haval160 (3 rounds)
that it's faster than SHA1? And to optimize still more it with SIMD instructions
in kernelspace and userland.

>
> zlib tends to be a lot more noticeable (especially the uncompression: it
> may be faster than compression, but it's done _so_ much more that it
> totally dominates).
>
> 			Linus

It's better

1.   "Don't compress this repo but compact this uncompressed repo
      using minimal spanning forest and deltas"
2.   "After, compress this whole repo with LZMA (e.g. 48MiB) from 7zip before
      burning it to DVD for backup reasons or before replicating it to
internet".

   J.C.Pizarro "the noiser"

```

## Johannes Schindelin, 2007-12-08 12:24

Subject: Re: Git and GCC
Message-ID: <Pine.LNX.4.64.0712081223070.27959@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0712081223070.27959%40racer.site
In-Reply-To: <998d0e4a0712071821o520a75c4lbcaae92256071f48@mail.gmail.com>

```
Hi,

On Sat, 8 Dec 2007, J.C. Pizarro wrote:

> On 2007/12/07, "Linus Torvalds" <torvalds@linux-foundation.org> wrote:
>
> > SHA1 is almost totally insignificant on x86. It hardly shows up. But 
> > we have a good optimized version there.
> 
> If SHA1 is slow then why dont he contribute adding Haval160 (3 rounds) 
> that it's faster than SHA1? And to optimize still more it with SIMD 
> instructions in kernelspace and userland.

He said SHA-1 is insignificant.

> > zlib tends to be a lot more noticeable (especially the uncompression: 
> > it may be faster than compression, but it's done _so_ much more that 
> > it totally dominates).
> 
> It's better
> 
> 1.   "Don't compress this repo but compact this uncompressed repo
>       using minimal spanning forest and deltas"
> 2.   "After, compress this whole repo with LZMA (e.g. 48MiB) from 7zip before
>       burning it to DVD for backup reasons or before replicating it to
>	internet".

Patches? ;-)

Ciao,
Dscho

```

## Joe Buck, 2007-12-08 19:53

Subject: Re: Git and GCC
Message-ID: <20071208195352.GB4731@synopsys.com>
URL: https://gitlist.dev/e/20071208195352.GB4731%40synopsys.com
In-Reply-To: <Pine.LNX.4.64.0712081223070.27959@racer.site>

```
On Sat, 8 Dec 2007, J.C. Pizarro wrote:
> > 1.   "Don't compress this repo but compact this uncompressed repo
> >       using minimal spanning forest and deltas"
> > 2.   "After, compress this whole repo with LZMA (e.g. 48MiB) from 7zip before
> >       burning it to DVD for backup reasons or before replicating it to
> >	internet".

On Sat, Dec 08, 2007 at 12:24:00PM +0000, Johannes Schindelin wrote:
> Patches? ;-)

git list, meet J.C. Pizarro.  Care to take him off of our hands for
a while?  He's been hanging on the gcc list for some time, and perhaps
seeks new horizons.

Mr. Pizarro has endless ideas, and he'll give you some new ones every day.
He thinks that no one else knows any computer science, and he will attempt
to teach you what he knows, and tell you to rewrite all of your code based
on something he read and half-understood.  But he's not interested in
actually DOING the work, mind you; that's up to you.  When you object
that he's wasting your time, he'll start talking about freedom of speech.

```

## Marco Costalba, 2007-12-08 20:28

Subject: Re: Git and GCC
Message-ID: <e5bfff550712081228s6bcb064ep23f2bb06ef2c6b9b@mail.gmail.com>
URL: https://gitlist.dev/e/e5bfff550712081228s6bcb064ep23f2bb06ef2c6b9b%40mail.gmail.com
In-Reply-To: <20071208195352.GB4731@synopsys.com>

```
On Dec 8, 2007 8:53 PM, Joe Buck <Joe.Buck@synopsys.com> wrote:
>
> Mr. Pizarro has endless ideas, and he'll give you some new ones every day.

That's true.

> He thinks that no one else knows any computer science, and he will attempt
> to teach you what he knows,

It's not the only one ;-) is in good and numerous company.

>  But he's not interested in
> actually DOING the work, mind you; that's up to you.

Where did have you read this ? I missed that part.

>  When you object
> that he's wasting your time, he'll start talking about freedom of speech.
>

Actually he never spoke like that (probably I missed that part too).


Thanks
Marco

```

## Daniel Berlin, 2007-12-09 01:51

Subject: Re: Git and GCC
Message-ID: <4aca3dc20712081751v6c6a7c84w40d093bcac93a2bb@mail.gmail.com>
URL: https://gitlist.dev/e/4aca3dc20712081751v6c6a7c84w40d093bcac93a2bb%40mail.gmail.com
In-Reply-To: <e5bfff550712081228s6bcb064ep23f2bb06ef2c6b9b@mail.gmail.com>

```
>
> Where did have you read this ? I missed that part.
>
> >  When you object
> > that he's wasting your time, he'll start talking about freedom of speech.
> >
>
> Actually he never spoke like that (probably I missed that part too).
>
>

Read gcc mailing list archives, if you have a lot of time on your hands.

```

## Nix, 2007-12-15 00:18

Subject: Re: Git and GCC
Message-ID: <877ijg6c9u.fsf@hades.wkstn.nix>
URL: https://gitlist.dev/e/877ijg6c9u.fsf%40hades.wkstn.nix
In-Reply-To: <Pine.LNX.4.64.0712081223070.27959@racer.site>

```
On 8 Dec 2007, Johannes Schindelin said:

> Hi,
>
> On Sat, 8 Dec 2007, J.C. Pizarro wrote:
>
>> On 2007/12/07, "Linus Torvalds" <torvalds@linux-foundation.org> wrote:
>>
>> > SHA1 is almost totally insignificant on x86. It hardly shows up. But 
>> > we have a good optimized version there.
>> 
>> If SHA1 is slow then why dont he contribute adding Haval160 (3 rounds) 
>> that it's faster than SHA1? And to optimize still more it with SIMD 
>> instructions in kernelspace and userland.
>
> He said SHA-1 is insignificant.

Actually davem also said it *is* significant on SPARC. But of course
J. C. Pizarro's suggested solution won't work because you can't just go
around replacing SHA-1 in git with something else :) you could *add* new
hashing methods, but you couldn't avoid SHA-1, and adding a new hashing
method would bloat every object and every hash in objects like commits
with an indication of which hashing method was in use.

(But you know this.)

>> 1.   "Don't compress this repo but compact this uncompressed repo
>>       using minimal spanning forest and deltas"

... and then you do a git-gc. Oops, now what?

... or perhaps you want to look something up in the pack. Now you have to
unpack a large hunk of the whole damn thing.

>> 2.   "After, compress this whole repo with LZMA (e.g. 48MiB) from 7zip before
>>       burning it to DVD for backup reasons or before replicating it to
>>	internet".
>
> Patches? ;-)

Replicating a pack to the internet is almost invariably replicating
*parts* of a pack anyway, which reduces to the problem with option 1
above...

-- 
`The rest is a tale of post and counter-post.' --- Ian Rawlings
                                                   describes USENET

```
