This is the mail archive of the gcc-bugs@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]

[Bug libstdc++/40852] [parallel-mode] parallel sort run time increases ~10 fold when vector size gets over ~4*10^9



------- Comment #17 from paolo dot carlini at oracle dot com  2009-10-22 17:46 -------
Is something known about the actual size of a, b, and c? Also, I don't know
which is the required precision for the result: must be exact if representable?
I suppose not, otherwise the suggestiong of using double would not make sense.
Depending on the answer to the above, there are various options, maybe checking
for a * b overflowing (if the quantities are all positive, then checking for
wraparound is easy) and then taking the appropriate actions.

Anyway, barring more sophisticated solutions, using long double seems a better
idea to me, because on most widespread targets a long double is at least 80
bits, with a mantissa of at least 64 bits, thus able to exactly represent any
long long integer.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40852


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