[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

My take on the diff-optimizations-bytes branch

From: Stefan Fuhrmann <stefanfuhrmann_at_alice-dsl.de>
Date: Sat, 01 Jan 2011 23:25:38 +0100

Hi Johan,

Thursday night I did something stupid and had a look at how
svn blame could be made faster based on the HEAD code in
your branch.

One night and most of the following day later, I think I made it
a few percent faster now. Some of the code I committed directly
to /trunk and you need to pull these changes into your branch
to compile the attached patch.

Feel free to test it, take it apart and morph it any way you like --
I know the patch isn't very pretty in the first place. I tested the
patch on x64 LINUX and would like to hear whether it at least
somewhat improved performance on your system for your
svn blame config.xml use-case.

-- Stefan^2.

Speed-up of datasource_open() and its sub-routines
by a series of optimizations:

* allocate the file[] array on stack instead of heap
   (all members become directly addressible through
   the stack pointer because all static sub-functions
   will actually be in-lined)
* minor re-arragements in arithmetic expressions to
   maximize reuse of results (e.g. in INCREMENT_POINTERS)
* move hot spots to seperate functions and provide a
   specialized version for file_len == 2
   (many loops collapse to a single execution, other
   values can be hard-coded, etc.)
* use seperate loops to process data within a chunk
   so we don't need to call INCREMENT_POINTERS & friends
   that frequently
* scan / compare strings in machine-word granularity
   instead of bytes

Received on 2011-01-01 23:40:09 CET

This is an archived mail posted to the Subversion Dev mailing list.