On Aug 9, 2012, at 1:22 AM, Richard Guenther wrote: > Ah. For simple objects like double_int I prefer to have either all ops > mutating > or all ops non-mutating.
wide_int, which replaces double_int for int types, is always non-mutating, by value interface. In C++, it will be const & input parameters, to avoid the copies and retain the performance. We maintain a cache under it, and reuse out of it for the long lived objects, for short lived, we just allocate the on the stack as needed.