• Post Reply Bookmark Topic Watch Topic
  • New Topic

Performance hit from javac -g

 
Lazlo Zloax
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of performance hit can be expected by compiling all out source code with javac -g (or <javac debug="on" ...> in ant)

I have been googling around for it but I can't find any measurments except a couple that explains that the resulting class files is about 30% larger than with javac -g:none

We run all out production code on an ibm aix machine with jdk 1.3

Comments ?
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, measure your app now, recompile with your flags, measure again, compare - voila!

I would expect a speed-performance-loss below 3% - if any at all.
The debug-info isn't used in normal execution, so there is only the small amount in loading it.

But please test yourself and tell us the results.
[ August 26, 2004: Message edited by: Stefan Wagner ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would be really surprised if it had any effect on performance. After all, it just adds some metadata to the bytecode.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!