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 Tue, 25 May 2004 23:39:48 GMT
--- "Mark R. Diggory" <mdiggory@latte.harvard.edu> wrote:
> Phil Steitz wrote:
> 
> > [Yoav] You probably want strictfp: 
> > http://www.jguru.com/faq/view.jsp?EID=17544.
> >
> >[Phil] I am not sure that we want this, but I am by no means a JVM expert. 
> From what I understand, the decision comes down to strict consistency of
> results on different platforms (mostly involving NaN and other boundary
> conditions) vs. performance.   In most practical applications, I would
> personally be more interested in performance.  It would be a major PITA
> (given the way things have to be declared); but I suppose that in theory we
> could support both.  I am open to discussion on this, but my vote at this
> point would be to release without strictfp support for 1.0.
>
> Its tough that its a modifier and not some sort of JVM option, seems it 
> would make libraries alot more flexible if you controlled it in the 
> behavior of the JVM and not something you have to compile into your 
> code. To provide this functionality such that it could be enabled or 
> disabled we'ed need to have twin libraries or some sort of "wrapper 
> methods", one with it in place and the other with it removed.

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.


Al

=====
Albert Davidson Chou

    Get answers to Mac questions at http://www.Mac-Mgrs.org/ .


	
		
__________________________________
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