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 / General / October 2005

Tip: Looking for answers? Try searching our database.

javac: debug vs. optimized classes?

Thread view: 
Markus Dehmann - 04 Oct 2005 03:03 GMT
The external library I am using is compiled with debug info, and it's
pretty slow.

Could I expect it to be much faster if it were compiled with
-debug:none?  What about javac -O?  Does that still exist?

Are there speed comparisons between debug and optimized classes?

Thanks!
Markus
Thomas Fritsch - 04 Oct 2005 03:25 GMT
"Markus Dehmann" <markus.dehmann@gmail.com> schrieb:
> The external library I am using is compiled with debug info, and it's
> pretty slow.
>
> Could I expect it to be much faster if it were compiled with -debug:none?
No, it will have exactly the same execution speed. The only things you can
expect are
(1) a smaller file size (by a few percent), and hence slightly shorter
download times
(2) less error information (due to missing line numbers in exception stack
traces)

> What about javac -O?  Does that still exist?
>
> Are there speed comparisons between debug and optimized classes?
Signature

"TFritsch$t-online:de".replace(':','.').replace('$','@')

Roedy Green - 04 Oct 2005 07:48 GMT
>No, it will have exactly the same execution speed.

Actually it would be slightly slower since some of your ram is chewed
up with line number offset tables and the like.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Roedy Green - 04 Oct 2005 07:47 GMT
>Are there speed comparisons between debug and optimized classes?

There is an fairly way to find out and on your particular program
where it matters most:

use the -g:none option on Javac  and execute with the public JRE
java.exe to try without debug.

use the -g option on javac and execute with the private JRE java.exe
in the JDK to try with debug.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



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.