
Hi, On Fri, Apr 30, 2004 at 12:01:01PM +0200, Richard Peters wrote:
From: "Christoph Ludwig" <cludwig@cdc.informatik.tu-darmstadt.de>
There is not much special about my library. Like the gmp, this library uses expression templates to avoid the creation of temporary values, which when the values become large provide an increase in performance.
I sometimes wonder whether a bigint library that implements move semantics could not provide an additional significant efficiency gain. (Since I can avoid temporaries most of the time, my applications don't profit from expression templates that much.) I never performed experiments, though, this is only a conjecture.
Do you have any plans in this direction?
What would implementing move semantics look like? Do you mean that an expression like x = y * z where y and z aren't used after this expression can be implemented as a swap(x, y); x *= z? I'm not sure how to implement it, but if a method exists which provides a significant efficiency gain and does not interfere with the interface too much, then I'm certainly interested in implementing it.
The only proposal I ever toyed with was Andrei Alexandrescu's Mojo. But recently there were threads about two proposals by David Abrahams and Andrea Torsello (search the archive for subjects that contain "move semantics"). AFAIR, no proposal could hide all implementation details from the user of the classes with move semantics, but the interfaces did not become too awkward. Regards Christoph -- http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/cludwig.html LiDIA: http://www.informatik.tu-darmstadt.de/TI/LiDIA/Welcome.html