Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Giving a program priority briefly



>> My question/problem is that the three benchmarks often give different
>> timings, and the timings vary between runs. It seems roughly related to
>> system load. ...

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.

> If 3 tests is not  enough then we can run 30 test ~ 2.5 munites, or
> large number of sampling.

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.

Darren

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.

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.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links