Generic code: @autoconst, @autopure, @autonothrow
bearophile
bearophileHUGS at lycos.com
Sun Aug 29 08:35:29 PDT 2010
Justin Johansson:
> Is the reason for this due to some optimization strategy to
> avoid copying and changing the sign on the copy?
If each of your numbers need 500 MB of RAM, copying a number just to change its sign, and then free the original number is a significant waste of time. So it's an optimization offered by GMP.
Bye,
bearophile
More information about the Digitalmars-d
mailing list