JavaMemberNode optimisation

Thomas Leonard <tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]>
Newsgroups gmane.comp.lang.e.general
Organization IT Innovation
Message-ID <[email protected]>
This patch makes my program run about 20% faster by disabling an
"optimisation" in JavaMemberNode.

I propose to apply it; does anyone have a test-case where the
optimisation actually helps?


-- 
Dr Thomas Leonard
IT Innovation Centre
2 Venture Road
Southampton
Hampshire SO16 7NP

Tel: +44 0 23 8076 0834
Fax: +44 0 23 8076 0833
mailto:tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]
http://www.it-innovation.soton.ac.uk

_______________________________________________
e-lang mailing list
[email protected]
http://www.eros-os.org/mailman/listinfo/e-lang
0001-Disabled-double-call-optimisation.patch (text/x-patch, 1.4 KB)
>From 2a25cf6b5ec65bb3bcc6970786b0189f2fe28811 Mon Sep 17 00:00:00 2001
From: Thomas Leonard <tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]>
Date: Fri, 16 Apr 2010 13:43:16 +0100
Subject: [PATCH] Disabled double-call "optimisation"

It actually seems to make things slower.
---
 .../org/erights/e/elib/prim/JavaMemberNode.java    |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/src/jsrc/org/erights/e/elib/prim/JavaMemberNode.java b/src/jsrc/org/erights/e/elib/prim/JavaMemberNode.java
index 183bcec..494b615 100644
--- a/src/jsrc/org/erights/e/elib/prim/JavaMemberNode.java
+++ b/src/jsrc/org/erights/e/elib/prim/JavaMemberNode.java
@@ -178,14 +178,8 @@ public abstract class JavaMemberNode extends MethodNode implements EStackItem {
     public Object execute(Object optSelf, String verb, Object[] args) {
         try {
             Object result;
-            // TODO the typical case probably requires coercion (esp. ints)
-            //make the typical case faster: first try invoking without
-            //coercion. If we get into trouble, then try coercing the
-            //arguments.
             Runner.pushEStackItem(this);
             try {
-                result = innerExecute(optSelf, args);
-            } catch (IllegalArgumentException ex) {
                 Object newSelf;
                 Object[] newArgs;
                 newSelf = E.as(optSelf, receiverType());
-- 
1.7.0.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.