From: Richard Harlos Date: 2002-02-18T01:45:23+09:00 Subject: Re: OOP overhead (Was: tiny contest...) On Sun, 17 Feb 2002 11:00:45 -0500, Albert Wagner wrote: > ...no solution making use of > these classes came anywhere close to Dave's time. So now I am > wondering: Is OOP not appropriate for certain kinds of problems? Is > this one such instance? Or am I just a poor programmer? My experience in other languages has been similar. I once refactored a huge, single procedure that parsed out large volumes of telephone company data for corporate clients and stuffed that data into tables. My refactoring eliminated redundant instances of code, shrinking the source file considerably. I also implemented a rather straight-forward API so that this routine could be easily implemented generically rather than for just a few specific clients. In the end, the run-time performance of my refactored version exceeded the "ugly, redundant" version by several times. My then manager told me that I'd done a really nice job of refactoring but, in this case, the performance of this routine was more important than an refactoring elegance I may've achieved. I still love refactoring to "purer" OO implementations but when performance is a critical aspect of the function/procedure, I resign myself to the down-n-dirty old-school mindset of procedural coding. Sadly, in almost every case the performance increase is significant. Just my 2 cents, for what it's worth :-) Richard -- Man's mind, once stretched by a new idea, never regains its original dimensions." --Oliver Wendell Holmes, Jr.