~jameinel/+junk/godirstate

Viewing all changes in revision 20.

  • Committer: John Arbash Meinel
  • Date: 2011-05-27 13:56:03 UTC
  • Revision ID: john@arbash-meinel.com-20110527135603-uo2exhz02gcql1pi
Play with removing the 'extra' field. But it doesn't seem very expensive
for cases where we don't use it. 187ms to 185ms. Not tracking the extra
content is more apparent, at 255ms vs 289ms. But parsing-and-not-keeping data
is cheating, so it doesn't really count.
With just a working+basis, we're at 187ms vs 131ms, which is pretty good.
6prof gives this layout:
10 loops 70133 entries in 186.195ms
186 samples (avg 1 threads)
 19.35%bytes.IndexByte
  8.06%runtime.mcpy
  7.53%syscall.Syscall
  4.84%runtime.memclr
  4.84%scanblock
  4.84%sweep
  4.30%bytes.Equal
  3.76%dirstate.*entryParser·getNext
So we still spend most of the time finding null bytes, followed by time
copying bytes into new buffers. I guess the 8% syscall times is for
reading the content, since we don't read everything-up-front like we
do in the python code.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: