A performance improvement! 
Author Message
 A performance improvement!

I've been working on performance testing, and I came across a strange
situation. In my tests,

     str.gsub!(/[abc]/, '')

ran slower than

     str.gsub!(/a/, '')
     str.gsub!(/b/, '')
     str.gsub!(/c/, '')

Matz ran the same tests, and got opposite results.

The difference between our two systems was the version of gcc. I was
running egcs 2.91, and he was running gcc 2.95.2.

So, I upgraded my compiler, and lo! my test timings changed
dramatically.

                 Old           New

     Test1     1.339         0.647

     Test2     0.671         0.259

So, a compiler upgrade gave me a factor of 2 performance improvement
with code than contains character classes.

Just thought I'd pass that on.

Regards

Dave



Sun, 22 Dec 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Performance improvements in 5.0?

2. Performance improvements between VW 3.0 and VW 5i

3. vw2.5 performance improvements

4. J Performance Improvements

5. Question on performance improvement through re-design.

6. Python 1.5b1, code review for possible performance improvements

7. Performance improvement opportunities

8. ODBC performance Improvements

9. malloc performance affecting python performance

10. ST80 performance; STA performance and booleans

11. Improvement to generated ActiveX methods?

12. Refinancing, Second Mortgage, Home Improvement

 

 
Powered by phpBB® Forum Software