This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]