This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Suppose the method or class is final. Might we not wind up making a virtual-style call where meth->index == -1?
Bryce> Incidentally, JNI calls seem to be at least 10X
Bryce> slower than the JRE (for java->native calls, which this patch doesn't
Bryce> effect). I imagine that speeding JNI up would help SWT and AWT
Bryce> significantly.
I assume you mean a call from java code to a native method implemented as JNI. How did you measure this? I'd guess that the first such call to a given method would be very slow, then faster on the second call, after we look up and cache the pointer.
[bryce@hokkaido invbench]$ java Bench no call: 26ms [5ns / call] local: 23ms [4ns / call] private: 18ms [3ns / call] interface: 97ms [19ns / call] i/f after cast: 101ms [20ns / call] abstract: 95ms [19ns / call] abstract w/cast: 94ms [18ns / call] native: 317ms [63ns / call] 140000028
[bryce@hokkaido invbench]$ ./invbench no call: 10ms [2ns / call] local: 65ms [13ns / call] private: 10ms [2ns / call] interface: 134ms [26ns / call] i/f after cast: 55ms [11ns / call] abstract: 65ms [13ns / call] abstract w/cast: 57ms [11ns / call] native: 3193ms [638ns / call] 140000028
Attachment:
invbench.tar.gz
Description: GNU Zip compressed data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |