Subject: Re: [boost] [xint] Boost.Move vs Copy-on-Write timings
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-05-02 18:43:48
Chad Nelson wrote:
> Times are measured in seconds, using two sets of ten 2048-bit integers.
> The tests consisted of adding each of those pairs of numbers together
> 10,000 times, multiplying them 10,000 times, and doing a "mulmod"
> operation on them (with a third randomly-generated 2048-bit modulus
> argument) 1,000 times. Each test was run three times, under as close to
Move semantics can optimize away some allocations that copy on write can't,
such as for example
w = x * y + z;
(assuming that x*y already has enough bits to store x*y+z). But it doesn't
have to be either-or; you can move even when copy on write is used.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk