On Wed, Mar 01, 2017 at 03:05:25PM -0800, Linus Torvalds wrote: > On Wed, Mar 1, 2017 at 2:51 PM, Johannes Schindelin > <Johannes.Schindelin@xxxxxx> wrote: > > > > But I think bigger than just developers on Windows OS. There are many > > developers out there working on large repositories (yes, much larger than > > Linux). Also using Macs and Linux. I am not at all sure that we want to > > give them an updated Git they cannot fail to notice to be much slower than > > before. > > Johannes, have you *tried* the patches? > > I really don't think you have. It is completely unnoticeable in any > normal situation. The two cases that it's noticeable is: > > - a full fsck is noticeable slower > > - a full non-local clone is slower (but not really noticeably so > since the network traffic dominates). > > In other words, I think you're making shit up. I don't think you > understand how little the SHA1 performance actually matters. It's > noticeable in benchmarks. It's not noticeable in any normal operation. > > .. and yes, I've actually been running the patches locally since I > posted my first version (which apparently didn't go out to the list > because of list size limits) and now running the version in 'pu'. You have to remember that some of the Git for Windows users are doing horrific things like using repositories with 450MB .git/index files, and the speed to compute the sha1 during an update is noticeable there. IMHO that is a good sign that the right approach is to switch to an index format that doesn't require rewriting all 450MB to update one entry. But obviously that is a much harder problem than just using an optimized sha1 implementation. I do think that could argue for turning on the collision detection only during object-write operations, which is where it matters. It would be really trivial to flip the "check collisions" bit on sha1dc. But I suspect you could go faster still by compiling against two separate implementations: the fast-as-possible one (which could be openssl or blk-sha1), and the slower-but-careful sha1dc. -Peff