I rolled DoubleDouble into my benchmarking and re-ran. for it's precision
range it outperforms Apfloat & BD as expected. Obviously there is a bit of
time wandering as hotspot warms up but DoubleDouble should get us twice as
far into the fractal (34 sig. figures) at decent performance before we need
Apfloat.
Is anyone aware of an implementation of QuadDouble for Java? That would get
us 64sf without Apfloat. Bailey has one for C++ but my math/bit theory isn't
good enough to re-write it in Java. If only Knuth were here...
100 500 1000 (iterations)
16sf: {3ms/d,
13ms/dd,142ms/Apf,52ms/BD}{0ms/d,9ms/dd,84ms/Apf,37ms/BD}{1ms/d,4ms/dd,32ms/Apf,
33ms/BD}
32: {0ms/dd, 3ms/Apf, 5ms/BD}{1ms/dd, 17ms/Apf, 23ms/BD}{1ms/dd, 38ms/Apf,
43ms/BD}
64: {5ms/Apf, 9ms/BD}{26ms/Apf, 49ms/BD}{54ms/Apf, 92ms/BD}
128: {11ms/Apf, 25ms/BD}{58ms/Apf, 132ms/BD}{116ms/Apf, 315ms/BD}
256: {38ms/Apf, 86ms/BD}{193ms/Apf, 413ms/BD}{365ms/Apf, 862ms/BD}
512: {129ms/Apf, 323ms/BD}{402ms/Apf, 1s/BD}{633ms/Apf, 2s/BD}
1024: {120ms/Apf, 1s/BD}{647ms/Apf, 6s/BD}{1s/Apf, 12s/BD}
(significant figures decimal)
d=double (limited to 17sf)
dd=DoubleDouble (limited to 34sf)
Apf=Apfloat (unlimited)
BD=BigDecimal (unlimited)
obviously <18sf we want to use double, <35sf DoubleDouble, and thereafter
Apfloat (unless we find/write quaddouble). each cell above represents a
single pixel, so at 1024sf 1s/pixel is gonna take a while... :-(
>
> On 5 April 2010 19:53, michaelm <[email protected]> wrote:
>
>> Hi,
>> I made some benchmarking on a few OS java libraries a few months ago.
>> The test consists of running two geometric computation methods
>> involving additions, substraction and multiplications
>> - isCounterClockWise
>> - isInCircle
>> For 1 000 000 operations I get
>> double 104 ms
>> DoubleDouble 4334 ms
>> BigDecimal 29975 ms
>> Real 36058 ms
>> Dfp10 61128 ms
>> Apfloat 98966 ms
>>
>> This is a very partial test which does not take into account what each
>> library can really do (floating point vs arbitrary precision,
>> including/not including transcendantal functions...)
>>
>> http://tsusiatsoftware.net/
>> http://real-java.sourceforge.net/Real.html
>> http://dfp.sourceforge.net/
>> http://www.apfloat.org/apfloat_java/
>>
>> Michaƫl
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "The Java Posse" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<javaposse%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/javaposse?hl=en.
>>
>>
>
--
You received this message because you are subscribed to the Google Groups "The
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.