 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
John Doe Guest
|
Posted: Sun Jul 11, 2004 3:14 am Post subject: One bytecode instruction -> how many asm? |
|
|
On average, how many intel 386 assembler instructions are generated for
one JVM bytecode instruction?
|
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Sun Jul 11, 2004 7:56 am Post subject: Re: One bytecode instruction -> how many asm? |
|
|
On Sat, 10 Jul 2004 22:14:44 -0500, John Doe <johndoe (AT) nowhere (DOT) com>
wrote or quoted :
| Quote: | On average, how many intel 386 assembler instructions are generated for
one JVM bytecode instruction?
|
What you could do is load classes, knowing the class file size and see
the effect on available RAM after you exercise the methods for several
minutes.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
|
|
| Back to top |
|
 |
Artur Biesiadowski Guest
|
Posted: Sun Jul 11, 2004 3:11 pm Post subject: Re: One bytecode instruction -> how many asm? |
|
|
John Doe wrote:
| Quote: | On average, how many intel 386 assembler instructions are generated for
one JVM bytecode instruction?
|
Average is very bad metric here. A lot of instructions will generate 1-3
x86 opcodes, while some of them will be very heavy (invoke*, monitor*,
throw, anewarray, etc). This heaviness of course depends if they are
inlined or passed to some utility function.
I suppose that most open source jvms allow to dump their generated code,
so you will be able to see it yourself. For very easy exercise I would
suggest tya, for more complicated (but more representative for real
world jits) - orp.
In tya, most opcodes generated 2-4 x86 instructions, 2-8 bytes. Heavier
instructions like invoke, could easily go into 40-50 instruction count
range, with probably 100-150 bytes taken.
Maybe you can tell why do you need this metric ? Probably there are
different metrics you can use which will be more reliable ?
Artur
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|