Patch: gcj optimizations

Eric Blake ebb9@email.byu.edu
Tue Oct 16 15:42:00 GMT 2001


> 
> We could also inline things like Math.sin, Math.cos, etc.  Doing that
> would require figuring out how to connect gcj to the builtin function
> infrastructure in gcc.  This might be tricky; for instance I think
> we'd want to fall back on calling `java.lang.Math.cos' instead of
> calling plain `cos' if the builtin is disabled.

Isn't java.lang.Math.cos specified that it is permitted to be native in
the first place?  It is only java.lang.StrictMath.cos which must be
implemented in Java. (Likewise for the other functions in
Math/StrictMath).  The only thing you might need to worry about with a
native implementation of Math is whether the native method (or inlined
machine instruction, on platforms that support it) is accurate enough to
meet the specifications.

> 
> Tom
> 

-- 
This signature intentionally left boring.

Eric Blake             ebb9@email.byu.edu
  BYU student, free software programmer



More information about the Java-patches mailing list