View Full Version : TDD and code performance/efficiency
Michael Feathers
07-17-2003, 07:39 AM
"Steve Jorgensen" <nospam@nospam.nospam> wrote in message
news:29kchvk38t2gbq68jr0oc5c7kkjenpfbsm@4ax.com... The code I'm starting to write using TDD is very nice in many ways. It's
short, easy to read/modify, and does everything it's supposed to do. I can see, however, that is is woefully inefficient.
Maybe this paper will help? I found that sometimes the code that I've TDDed
ends up being more efficient than I expect it to, mostly because I delay
computation until it really needs to be done and sometimes it doesn't have
to be done at all:
http://www.objectmentor.com/resources/articles/MichaelFeathers--EmergentOpti
mizationInTestDrivenDesign.pdf
Michael Feathers
www.objectmentor.com
On Thu, 17 Jul 2003 11:39:50 -0400, "Michael Feathers"
<mfeathers@objectmentorNOSPAM.com> wrote:
"Steve Jorgensen" <nospam@nospam.nospam> wrote in messagenews:29kchvk38t2gbq68jr0oc5c7kkjenpfbsm@4ax.com... The code I'm starting to write using TDD is very nice in many ways. It'sshort, easy to read/modify, and does everything it's supposed to do. I can see, however, that is is woefully inefficient.Maybe this paper will help? I found that sometimes the code that I've TDDedends up being more efficient than I expect it to, mostly because I delaycomputation until it really needs to be done and sometimes it doesn't haveto be done at all:http://www.objectmentor.com/resources/articles/MichaelFeathers--EmergentOptimizationInTestDrivenDesign.pdfMichael Featherswww.objectmentor.com
I'll check that out as soon as I figure out why my I can't open pdfs any more.
The inefficiency I'm talking about in this particular project is the frequency
of creating temorary String objects. Certainly, there may be other ways in
which my code has high potential efficiency.
MyLounge.com Site Map
Forum:
Cars,
Cell Phone,
Database,
Games,
Home Improvement,
IT,
Music,
School,
Sports,
Web Design,
Web Server,
Weight Loss
The MyLounge.com forum is intended for informational use only and should not
be relied upon and is not a substitute for any advice. The information contained
on MyLounge.com are opinions and suggestions of members and is not a representation
of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for
the accuracy, completeness or usefulness of any postings or the qualifications
of any person responding. Please consult a expert or seek the services of an
attorney in your area for more accuracy on your specific situation. Please note
that our forums also serve as mirrors to Usenet newsgroups. Many posts you see
on our forums are made by newsgroup users who may not be members of MyLounge.com
Term of Service
vBulletin v3.0.7, Copyright ©2000-2008, Jelsoft Enterprises Ltd.