classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java.lang.StrictMath


From: Per Bothner
Subject: Re: java.lang.StrictMath
Date: Thu, 14 Feb 2002 22:55:06 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8+) Gecko/20020208

Eric Blake wrote:
But maybe it
is worth it after all for StrictMath to have native implementations,

Note I am not saying that StrictMath should have native implementations,
only that it *may*, *if* the results are the same.

Is the overhead of calling a native method offset by the
speed of doing this number crunching without going through bytecode?

It depends.  For GCJ, there is no overhead for calling a native method,
beyond the normal method calling overhead, which is the same as in C++.
(For virtual calls.  Interface calls are a different matter.)  For JDK,
or other system with a good JIT, it is probably faster to use Java code.
--
        --Per Bothner
address@hidden   http://www.bothner.com/per/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]