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 02:16:10 +0900
- From: "Nguyen Vu Hung" <vuhung16plus@example.com>
- Subject: Re: [tlug] Giving a program priority briefly
- References: <466B5A87.7000002@dcook.org> <78d7dd350706100221u524aa0baxa6498541674863b0@mail.gmail.com> <466BD066.90302@dcook.org>
On 6/10/07, Darren Cook <darren@example.com> wrote:Thanks for the replies. It sounds like nice -20 is about the best I can get, easily. I've been running "w" before running the test, and waiting/kill-ing if it is high, which seems to have helped consistency.
You are playing with the system, not the code that is what you are refactoring...
Yes (though 2.5 minutes is a long time to run a nice -ve process!). However a 10-15 second compile and a 5 second benchmark is very appealing; I can refactor just a couple of lines at a time and test to see what affect it has.
You can do it less often. What I wanted to said is that the larger number of samples, the more accuracy execution time will you get.
P.S. For any C++ programmers out there: I was starting with a well-optimized program known as the fastest of its type ("libego" a UCT monte-carlo computer go program, C++, available under GPL), and wanted to refactor to make it easier to experiment with new algorithms. Ironically I've so far made it 5% *quicker*, mainly by replacing a function call with a functor class and merging two loops into a single loop.What is the methodologies ? Is g++ the compiler? Have you ever heard of lcov or tools like such? http://ltp.sourceforge.net/coverage/lcov.php When you use that, we know exactly what part of code need to be refactored - not by reading the code.
I also got some surprises such as calling a function in the same class gave no slowdown, but moving the function (marked as inline) to the base class (these are classes with no virtual functions) gave nearly over a 5% slowdown. So I used a macro.Ref. above.
-- Best Regards, Nguyen Hung Vu vuhung16plus{remove}@example.com An inquisitive look at Harajuku http://www.flickr.com/photos/vuhung/sets/72157600109218238/
- Follow-Ups:
- Re: [tlug] Giving a program priority briefly
- From: Darren Cook
- 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
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Giving a program priority briefly
- Next by Date: [tlug] contribution to F/OSS community
- 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