
2 May
2010
2 May
'10
10:43 p.m.
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.