OSDN Git Service

Faster implementations of Math/StrictMath's copySign methods.
authorElliott Hughes <enh@google.com>
Tue, 24 Aug 2010 22:50:58 +0000 (15:50 -0700)
committerElliott Hughes <enh@google.com>
Thu, 2 Sep 2010 01:19:15 +0000 (18:19 -0700)
commitd16c314465f7f5905fe8852eaa09d4e7e14ec835
tree87251e89765420c01a8a2c549a33fe69e430debe
parent3e6f49bbb915b880afe104ec784c66bda55da450
Faster implementations of Math/StrictMath's copySign methods.

These are only faster than the old native implementations now we have
intrinsics for float/int and double/long conversion, but given those,
they're about 4x faster.

We were already using Java for getExponent, the other obvious candidate
for an all-Java implementation.

[cherry-pick of a61c63c54ba46bb8a1dcbd888e3b29d6cedfb1ff from dalvik-dev to gingerbread]

Bug: 2935622
luni/src/main/java/java/lang/Math.java
luni/src/main/java/java/lang/StrictMath.java
luni/src/main/native/java_lang_Math.cpp