From: Christian L. <chr...@le...> - 2003-03-17 12:12:25
|
Hello, first let me say: valgrind is absolutly great, thank you for it! It saved me allready often. Because I was not able to add MMX support (seems not to be exactly easy). I saw this realy big switch(opt){case 0x00....} statement and thought "this must be slow". So I tried the "Labels as Values" feature of the gcc. (http://www.dis.com/gnu/gcc/gcc_79.html#SEC79) Yes it is a gcc feature, but because is specially for x86/Linux I can't see a problem. "benchmark": core:/home/ijuz/Mail/la# ls -l total 4508 -rw------- 1 ijuz ijuz 4602189 Mar 17 11:56 politech_at_politechbot_com core:/home/ijuz/Mail/la# nice -n -10 time /work/dev/val/bin/valgrind gzip -9 politech_at_politechbot_com normali-cvs: 13.57user 0.09system 0:14.07elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k 13.51user 0.08system 0:14.01elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k patched-cvs: 12.54user 0.06system 0:13.07elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k 12.56user 0.06system 0:12.97elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k this means (average): 13.54 -> 12.55 that is a speedup of about 7% in this case If you (Julian or Nick) are perhaps interested in it, I would clean it up further and remove this one switch() { } statement. I appended the patch, I hope nobody objects because of this few kb. (It is against the cvs from now) 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> |