From: Andreas Ericsson Date: Fri, 31 Aug 2007 09:53:22 GMT Subject: Re: Buffer overflows Message-ID: <46D7E512.2010905@op5.se> In-Reply-To: <1188536430.29782.903.camel@hurina> Timo Sirainen wrote: > On Thu, 2007-08-30 at 21:09 -0700, Linus Torvalds wrote: >> On Fri, 31 Aug 2007, Timo Sirainen wrote: >>>> Perhaps because your patch was using a totally nonstandard and slow >>>> interface, and had nasty string declaration issues, as people even pointed >>>> out to you. >>> Slow? >> Having a string library, and then implementing "str_append()" with a >> strlen() sounds pretty disgusting to me. >> >> Gcc could have optimized the strlen() away for constant string arguments, >> but since you made the thing out-of-line, it can't do that any more. >> >> So yes, I bet there are faster string libraries out there. > > Oh, well that's easy to fix. But I don't think the speed matters much in > string manipulation, it's usually not done in performance critical > paths. > In git it is, as strings are manipulated en masse in order to traverse history, look up paths from index/filesystem etc, etc. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231