AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

One bytecode instruction -> how many asm?

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> JVM, native methods and hardware
View previous topic :: View next topic  
Author Message
John Doe
Guest





PostPosted: Sun Jul 11, 2004 3:14 am    Post subject: One bytecode instruction -> how many asm? Reply with quote



On average, how many intel 386 assembler instructions are generated for
one JVM bytecode instruction?
Back to top
Roedy Green
Guest





PostPosted: Sun Jul 11, 2004 7:56 am    Post subject: Re: One bytecode instruction -> how many asm? Reply with quote



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





PostPosted: Sun Jul 11, 2004 3:11 pm    Post subject: Re: One bytecode instruction -> how many asm? Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> JVM, native methods and hardware All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.