Re: [computer-go] Effective Go Library v0.101

2007-02-16 Thread Darren Cook
>> trouble. Also, the alternative is usually function pointers which have >> atleast 50 times the overhead of a function object. Correct me if I'm >> wrong. >> > function objects really cannot be 50 times more efficient as function > pointer are rather efficient with very little overhead. With w

Re: [computer-go] Effective Go Library v0.101

2007-02-16 Thread Ɓukasz Lew
I will just tell You about my experiences: - allmost all code of benchmark in Ego library is inlined (remove_stone is not) - function pointer are usually inefficient, because jump prediction works poorly - when I introduced a parameter to simple_playout::run: function pointer that replaced play_o

Re: [computer-go] Effective Go Library v0.101

2007-02-16 Thread Chris Fant
Will small recursive functions be inlined when they are called from outside the function itself? ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/

Re: [computer-go] Effective Go Library v0.101

2007-02-16 Thread Luke Gustafson
Lukasz, any chance you can access the assembly to see how the compiler optimized it differently? That is a strange result. All that I could think of is, if you have several places where the function is called, and the compiler used to be inlining it, it may be faster (for cache reasons) to ma

Re: [computer-go] Effective Go Library v0.101

2007-02-16 Thread Nick Apperson
I highly disagree that the point of function objects is to allow runtime polymorphism. Certainly that is useful, and I have no objection to it. I like templates because they allows the compiler to optimize anything that is optimizable and doesn't make the programmer worry about it at all. This