Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Giving a program priority briefly
- Date: Mon, 11 Jun 2007 13:13:33 +0900
- From: Darren Cook <darren@example.com>
- Subject: Re: [tlug] Giving a program priority briefly
- References: <466B5A87.7000002@dcook.org> <78d7dd350706100221u524aa0baxa6498541674863b0@mail.gmail.com> <466BD066.90302@dcook.org> <78d7dd350706101016x184c0a29tbda67c68d66191ed@mail.gmail.com> <466C7778.1050803@dcook.org> <78d7dd350706101834k2d764dcbsd3af2c924f29743b@mail.gmail.com>
- User-agent: Thunderbird 1.5.0.10 (X11/20070301)
>> Refactoring is the art of changing the code to make it more >> readable/expandable (usually with a future addition in mind, not just >> for the sake of itself), without changing functionality. ... > ... For example, you can see a function is called 10000 times and > a nested loop is executed 2000 times while another part of code is > dead. By rewriting them, we reserve the functionality of the code yet > it becomes faster. Changing code to make it faster (or use less of any resource), without changing functionality, is called optimization. In contrast refactoring is something you do for the programmer's sake, not the program's sake. Usually you expect to lose a bit of performance when refactoring, e.g. when you add another level of redirection. I was running the benchmark after each change because in this case losing performance would be bad (e.g. instantly kill interest in my patches). But I wasn't optimizing. I think the biggest thing I got from Martin Fowler's Refactoring book was that refactoring, adding features, and optimization should be distinct steps (*). I tend to blur all three together if I don't think about it. Darren *: Though the steps may be small, e.g. 10 minutes refactoring, 20 minutes adding a new feature and its test, 10 minutes refactoring, 20 minutes optimizing, etc.
- Follow-Ups:
- Re: [tlug] Giving a program priority briefly
- From: Nguyen Vu Hung
- References:
- [tlug] Giving a program priority briefly
- From: Darren Cook
- Re: [tlug] Giving a program priority briefly
- From: Nguyen Vu Hung
- Re: [tlug] Giving a program priority briefly
- From: Darren Cook
- Re: [tlug] Giving a program priority briefly
- From: Nguyen Vu Hung
- Re: [tlug] Giving a program priority briefly
- From: Darren Cook
- Re: [tlug] Giving a program priority briefly
- From: Nguyen Vu Hung
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Can we still order TLUG t-shirts?
- Next by Date: [tlug] C++ training in Japan in English
- Previous by thread: Re: [tlug] Giving a program priority briefly
- Next by thread: Re: [tlug] Giving a program priority briefly
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links