From: Christian L. <chr...@le...> - 2003-03-17 14:06:53
|
On Mon, Mar 17, 2003 at 12:37:52PM +0000, Nicholas Nethercote wrote: > 1. Can you try it with a few other programs? It would be nice to see if > the 7% speedup is consistent across programs. Some programs I've used > for performance timing in the past: > > gzip > bzip2 48.36user 0.05system 0:49.79elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k 48.47user 0.07system 0:51.22elapsed 94%CPU (0avgtext+0avgdata 0maxresident)k patched: 47.93user 0.09system 0:49.17elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k 47.91user 0.09system 0:49.22elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k > latex real 0m5.088s user 0m4.790s sys 0m0.130s patched: real 0m4.741s user 0m4.490s sys 0m0.140s > konqueror (startup then quit immediately) It eats up all CPU till it -9 kill it when I quit it. (I still have KDE 2.2) > 2. The bottom of the webpage you mention says: > > "An alternate way to write the above example is > > static const int array[] = { &&foo - &&foo, &&bar - &&foo, > &&hack - &&foo }; > goto *(&&foo + array[i]); > > This is more friendly to code living in shared libraries, as it reduces > the number of dynamic relocations that are needed, and by consequence, > allows the data to be read-only." > > Valgrind is packaged as a shared library. Perhaps this might improve > things further? Yes, but initially I did not get it working, was a little stupid error. I'll try it, but this takes some time. cachegrind shows me with a little test programm, that it's slower with the later thing. But it's not a shared library and I don't know how often it has to be done. Regards, Christian Leber -- "Omnis enim res, quae dando non deficit, dum habetur et non datur, nondum habetur, quomodo habenda est." (Aurelius Augustinus) Translation: <http://gnuhh.org/work/fsf-europe/augustinus.html> |