Erik@Grijjy 123 Posted May 5, 2021 Need more precision than Single and Double can provide? Then maybe this will help: https://blog.grijjy.com/2021/05/05/high-precision/ 7 4 Share this post Link to post
Anders Melander 1782 Posted May 5, 2021 Some benchmarks comparing the performance of the DD and QD types to the native Single and Double types would be appreciated, if you have them. I've searched for performance numbers on the QD C++ library but couldn't find any relevant ones. The pdf contains some numbers but they are very old (Pentium II) and quite meaningless since the only comparison made is to the MPFUN Fortran library. Also the QD page you link to state that the C++ library isn't thread safe. Is the same true for your implementation? Share this post Link to post
David Heffernan 2345 Posted May 5, 2021 10 minutes ago, Anders Melander said: Also the QD page you link to state that the C++ library isn't thread safe Well, Delphi's floating point library isn't threadsafe so they can have a party together!! 3 Share this post Link to post
Erik@Grijjy 123 Posted May 5, 2021 1 minute ago, Anders Melander said: Some benchmarks comparing the performance of the DD and QD types to the native Single and Double types would be appreciated, if you have them. I've searched for performance numbers on the QD C++ library but couldn't find any relevant ones. The pdf contains some numbers but they are very old (Pentium II) and quite meaningless since the only comparison made is to the MPFUN Fortran library. Also the QD page you link to state that the C++ library isn't thread safe. Is the same true for your implementation? I have attached a spreadsheet I created a couple of years ago, comparing DD and QD to Single and Double, as well as to some well-known arbitrary precision libraries. Results may be a bit different now if I would run these tests again, but I think will still be in the same ballpark. In short, DD is 2-10 times slower than Double, but 5-100 times faster than other arbitrary precision libraries using the same precision. Likewise, QD is 4-100 times slower than Double, but 5-250 times faster than other libraries. You can also do some simple benchmarking by running the included Mandelbrot sample at different levels of precision (for a magnification level that works at Double precision). Since this library directly uses the QD C++ library, it has the same limitations (such as thread safety). Although I would assume that most operations would be thread safe since as long as you don't mutate the same DD/QD value from multiple threads. But I haven't checked the C++ source code for this, so I am not sure. MultiPrecisionSpeed.xlsx 3 2 Share this post Link to post
Anders Melander 1782 Posted May 5, 2021 6 minutes ago, Erik@Grijjy said: In short, DD is 2-10 times slower than Double, but 5-100 times faster than other arbitrary precision libraries using the same precision. Likewise, QD is 4-100 times slower than Double, but 5-250 times faster than other libraries. Thanks. Ballpark numbers are fine. Much appreciated. I just wanted to get an impression of what impact using this might have. 2-10 times slower for DD is much better than what I expected. That said, I can see that multiplication is one if the slower operations. That surprises me but I guess it must be because native multiplication is highly optimized in hardware. Share this post Link to post