Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Optimization of string.c



On Oct 5,  7:23pm, Sebastian Gniazdowski wrote:
}
} It might be that the faster the CPU is, the lower the gain is. If
} someone could repeat the tests on machine with 1.5 GHz or more it
} would be of value.

I ran the tests twice each, once built without the patch (and with
--enable-zsh-debug) and the other using the patch (but not debug,
accidentally), on a VirtualBox VM inside a 3.2GHz host.  cpuinfo in
the VM guest reports the same values as the host, whether that's an
accurate measure or not.  I may try again later with more care to
be sure the compiler flags are the same.

Note in the testopt2 and testopt4 cases performance was worse with
the patch, which is why I decided to send this even though I messed
up the configure flags.  Best viewed in fixed-width.


No patch w/ debug                  |  Patch w/o debug
-----------------------------------|----------------------------------
				   |  				
testopt1                           |  testopt1			
				   |  				
num  calls                time     |  num  calls                time  
-----------------------------------|----------------------------------
 1)    5        2214.75   442.95   |   1)    5        1690.37   338.07
 1)    5        2191.67   438.33   |   1)    5        1697.04   339.41
				   |  				
-----------------------------------|----------------------------------
				   |  				
testopt2			   |  testopt2			
				   |  				
num  calls                time     |  num  calls                time  
-----------------------------------|----------------------------------
 1)    5         271.99    54.40   |   1)    5         311.95    62.39
 1)    5         274.84    54.97   |   1)    5         312.72    62.54
				   |  				
-----------------------------------|----------------------------------
				   |  				
testopt3			   |  testopt3			
				   |  				
num  calls                time     |  num  calls                time  
-----------------------------------|----------------------------------
 1)    1       13331.32 13331.32   |   1)    1       10533.46 10533.46
 1)    1       13468.76 13468.76   |   1)    1       10538.59 10538.59
				   |  				
-----------------------------------|----------------------------------
				   |  				
testopt4			   |  testopt4			
				   |  				
num  calls                time     |  num  calls                time  
-----------------------------------|----------------------------------
 1)    1        2085.65  2085.65   |   1)    1        2442.47  2442.47
 1)    1        2010.71  2010.71   |   1)    1        2523.01  2523.01
				   |  				
-----------------------------------|----------------------------------



Messages sorted by: Reverse Date, Date, Thread, Author