Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Virtual Machine / July 2004

Tip: Looking for answers? Try searching our database.

One bytecode instruction -> how many asm?

Thread view: 
John Doe - 11 Jul 2004 04:14 GMT
On average, how many intel 386 assembler instructions are generated for
one JVM bytecode instruction?
Roedy Green - 11 Jul 2004 08:56 GMT
>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.
Signature

Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

Artur Biesiadowski - 11 Jul 2004 16:11 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.