On Mon, Aug 25, 2014 at 09:09:24PM +0000, Taylor R Campbell wrote: > Date: Mon, 25 Aug 2014 20:02:44 +0200 > From: "J. Hannken-Illjes" <hann...@eis.cs.tu-bs.de> > > Short answer: it is -- reverting external/gpl3/gcc/dist/gcc/builtins.c > from Rev. 1.3 to 1.2 brings back the old times which are the same as > they were on NetBSD 6. > > Given that this test has many calls to ufs_lookup/cache_lookup using > memcmp to check for equal filenames this is not a surprise. > > A rather naive "implementation" of memcmp (see below) drops the running > time from ~15 sec to ~9 secs. We should consider improving our memcmp. > > Sounds reasonable to me, although it looks like GCC's old builtin > memcmp expansion actually failed to implement our specification: it > returns -1, 0, or +1, like your patch, rather than the difference of > the first differing bytes or zero as our man page specifies. For most > uses it doesn't matter, of course, but we ought to make sure to follow > our own specification.
memcmp is only supposed to provide the correct sign, not the difference. Joerg