haberg-1 at telia.com
Wed Nov 16 16:14:34 CET 2011
On 16 Nov 2011, at 12:23, Marc Glisse wrote:
>> and then testing with a conversion of the pi program. In the most optimized version, the overhead is less than 10% relative C or C compile as C++,
> I believe you can get 0 overhead with gmpxx.
According to the GMP manual, sec. 12.1, "C++ Interface General", in the expression c = a+b, there no use of a temporary, but there is in a = b*c+d*e.
So there is overhead there.
In my code, they both call the move assignment operator. So there is a tradeoff: introduction of some move assignment operators, but replacing copy with move.
More information about the gmp-discuss