commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Al Chou <hotfusion...@yahoo.com>
Subject Re: [math] Design review pre 1.0
Date Wed, 26 May 2004 21:55:20 GMT
--- "Mark R. Diggory" <mdiggory@latte.harvard.edu> wrote:
> Al Chou wrote:
> > Before we go too far down this path, it would be very helpful to know just
> how
> > much performance penalty is incurred by specifying strictfp.  That FAQ
> > certainly suggests that the difference is large and undesirable, but like
> > profiling, you never really know what it is until you actually measure
> it....
> > 
> > Suggestion:  conduct an informal timing test of a few representative
> functions,
> > say, some of the transcendental functions in java.lang.Math, with and
> without
> > strictfp.  A loop doing 100,000 of these method calls should be sufficient
> to
> > have runtime lasting several seconds to several minutes depending on the
> > operation.  Run it at least three times to get an idea of the mean runtime
> and
> > standard deviation.
> > 
> 
> The tough part is that I think all the java.lang.Math functions already 
> are "strict" in that they simply call their strict counterparts in 
> java.lang.StrictMath.

Yeah, and almost all that stuff seems to be JNI calls, IIRC.  I downloaded the
fdlibm from metalab.unc.edu just for kicks, as well as some
interesting-sounding other libraries in the same directory.  Looks like that C
source code is GPL'ed, though, so we couldn't use it for commons-math (we may
have discussed that before), though maybe it could serve as a model for a Java
implementation just for benchmarking the penalty strictfp incurs.  I saw a
gamma function evaluator in there, and probably one or two others at least,
that could be good tests.


Al


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message