>> 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
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
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/
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
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