You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Evgeniya Maenkova (JIRA)" <ji...@apache.org> on 2008/02/09 15:05:07 UTC
[jira] Created: (HARMONY-5480) [drlvm][jit] Some of java.lang.Math
methods could be implemented by api_magics
[drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
------------------------------------------------------------------------------
Key: HARMONY-5480
URL: https://issues.apache.org/jira/browse/HARMONY-5480
Project: Harmony
Issue Type: Improvement
Components: DRLVM
Reporter: Evgeniya Maenkova
Attachments: MathTest.java, vm.math.patch2
The patch gives >7x speedup on my laptop on test mentioned below:
package math;
public class MathTest {
static void f() {
Math.abs(-123987.1236d);
Math.asin(0.7);
Math.acos(0.7);
Math.log(123.123);
Math.log10(123.123);
Math.log1p(123.123);
Math.sin(12312.123);
Math.cos(12312.123);
Math.sqrt(234234.234234);
Math.tan(234234.12342134);
Math.atan(2347.234);
Math.atan2(231.123, 0);
Math.abs(-123.1231123f);
}
public static void main(String[] args) {
System.out.println("Warmup started....");
for (int i = 0; i < 2500 * 2500; i ++) {
f();
}
for (int i = 0; i < 250 * 2500; i ++) {
f();
}
System.out.println("Warmup ended....");
long start = System.currentTimeMillis();
for (int i = 0; i < 2500 * 2500; i ++) {
f();
}
System.out.println("floor result: " + (System.currentTimeMillis() - start));
}
}
Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
$ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
_as_magic=true -Xem:server math.MathTest
Warmup started....
Warmup ended....
floor result: 4875
Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
$ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
_as_magic=false -Xem:server math.MathTest
Warmup started....
Warmup ended....
floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5480) [drlvm][jit] Some of java.lang.Math
methods could be implemented by api_magics
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeniya Maenkova updated HARMONY-5480:
---------------------------------------
Attachment: MathTest.java
test attached
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Attachments: MathTest.java, vm.math.patch2
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-5480) [drlvm][jit] Some of java.lang.Math
methods could be implemented by api_magics
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Varlamov resolved HARMONY-5480.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.0M6
Completed: At revision: 645888
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Varlamov
> Fix For: 5.0M6
>
> Attachments: math.diff, MathTest.java, vm.math.patch2, vm.math.patch4
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5480) [drlvm][jit] Some of
java.lang.Math methods could be implemented by api_magics
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568512#action_12568512 ]
Evgeniya Maenkova commented on HARMONY-5480:
--------------------------------------------
(a typo: ?->!)
George:
Thank you so much for your comments!
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Varlamov
> Attachments: MathTest.java, vm.math.patch2, vm.math.patch4
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5480) [drlvm][jit] Some of
java.lang.Math methods could be implemented by api_magics
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568491#action_12568491 ]
Evgeniya Maenkova commented on HARMONY-5480:
--------------------------------------------
George:
Thank you so much for your comments?
Aleksey:
Could you please correct this line before check in? Obviously, the change is pretty trivial. Thanks!
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Varlamov
> Attachments: MathTest.java, vm.math.patch2, vm.math.patch4
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-5480) [drlvm][jit] Some of java.lang.Math
methods could be implemented by api_magics
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Varlamov closed HARMONY-5480.
------------------------------------
Argh, I relied on George's and Mikhail's review but found a bunch of issues after committing:
- not appropriate magic for int/long ABS;
- bad signature used for ATAN2;
- incorrect magic for ATAN2 (it should give results ranged as (-Pi,Pi) but gave (-Pi/2,Pi/2)).
Also, definitions in encoder table still look strange/innaccurate, will try to grok further.
The major issues listed above are fixed at revision: 646262, regression test provided.
BTW, Math.sin/cos/tan now have lesser accuracy than required by spec (~10units vs 1 ulp) - hopefully this is tolerable behaviour for real apps.
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Varlamov
> Fix For: 5.0M6
>
> Attachments: math.diff, MathTest.java, vm.math.patch2, vm.math.patch4
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5480) [drlvm][jit] Some of java.lang.Math
methods could be implemented by api_magics
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeniya Maenkova updated HARMONY-5480:
---------------------------------------
Attachment: vm.math.patch4
patch corrected (performance neutral)
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Varlamov
> Attachments: MathTest.java, vm.math.patch2, vm.math.patch4
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5480) [drlvm][jit] Some of
java.lang.Math methods could be implemented by api_magics
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567321#action_12567321 ]
Evgeniya Maenkova commented on HARMONY-5480:
--------------------------------------------
Optimization can be switched on/off from commandline: -XX:jit.arg.Math_as_magic=true/false.
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Attachments: MathTest.java, vm.math.patch2
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5480) [drlvm][jit] Some of
java.lang.Math methods could be implemented by api_magics
Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568444#action_12568444 ]
George Timoshenko commented on HARMONY-5480:
--------------------------------------------
patch4 is Ok.
The only note, I would replace
+ name (IRManager* irm, CallInst* inst, MethodDesc* md, enum Math_function f, Mnemonic mn = Mnemonic_NULL)\
with
+ name (IRManager* irm, CallInst* inst, MethodDesc* md, Math_function f, Mnemonic mn = Mnemonic_NULL)\
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Varlamov
> Attachments: MathTest.java, vm.math.patch2, vm.math.patch4
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5480) [drlvm][jit] Some of java.lang.Math
methods could be implemented by api_magics
Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Fursov updated HARMONY-5480:
------------------------------------
Attachment: math.diff
math.diff: eclipse issue fixed
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Varlamov
> Attachments: math.diff, MathTest.java, vm.math.patch2, vm.math.patch4
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5480) [drlvm][jit] Some of java.lang.Math
methods could be implemented by api_magics
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeniya Maenkova updated HARMONY-5480:
---------------------------------------
Attachment: vm.math.patch2
patch attached
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Attachments: MathTest.java, vm.math.patch2
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5480) [drlvm][jit] Some of
java.lang.Math methods could be implemented by api_magics
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573726#action_12573726 ]
Alexey Varlamov commented on HARMONY-5480:
------------------------------------------
The patch fails on debug builds, e.g. on EHWA:
[mkdir] Created dir: /export/users2/avarlamo/working_vm/build/linux_x86_gcc_debug/tests/ehwa/wksp
[echo]
[echo] ==================================
[echo] Run Eclipse HelloWorld using jitrino.OPT
[echo] ==================================
[echo]
[java] Operand live at entry: s314(FP0D):double
[java] This means there is a use of the operand when it is not yet defined
[java] Operand live at entry: s313(FP0D):double
[java] This means there is a use of the operand when it is not yet defined
[java] Liveness verification failure
[java] Verification failure after spillgen
[java] Java Result: 11
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Varlamov
> Attachments: MathTest.java, vm.math.patch2, vm.math.patch4
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-5480) [drlvm][jit] Some of java.lang.Math
methods could be implemented by api_magics
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Varlamov reassigned HARMONY-5480:
----------------------------------------
Assignee: Alexey Varlamov
> [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics
> ------------------------------------------------------------------------------
>
> Key: HARMONY-5480
> URL: https://issues.apache.org/jira/browse/HARMONY-5480
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Varlamov
> Attachments: MathTest.java, vm.math.patch2
>
>
> The patch gives >7x speedup on my laptop on test mentioned below:
> package math;
> public class MathTest {
> static void f() {
> Math.abs(-123987.1236d);
> Math.asin(0.7);
> Math.acos(0.7);
> Math.log(123.123);
> Math.log10(123.123);
> Math.log1p(123.123);
> Math.sin(12312.123);
> Math.cos(12312.123);
> Math.sqrt(234234.234234);
> Math.tan(234234.12342134);
> Math.atan(2347.234);
> Math.atan2(231.123, 0);
> Math.abs(-123.1231123f);
> }
> public static void main(String[] args) {
> System.out.println("Warmup started....");
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> for (int i = 0; i < 250 * 2500; i ++) {
> f();
> }
> System.out.println("Warmup ended....");
> long start = System.currentTimeMillis();
> for (int i = 0; i < 2500 * 2500; i ++) {
> f();
> }
> System.out.println("floor result: " + (System.currentTimeMillis() - start));
> }
> }
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=true -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 4875
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -XX:jit.arg.Math
> _as_magic=false -Xem:server math.MathTest
> Warmup started....
> Warmup ended....
> floor result: 34141
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.