Ob links

shrik
consonant (896763)
The Motherlode
The Cult
Alterslash

Archive/Search



Please direct questions and comments (both yours and /.!) to the email address on the /. user page.

Listed on BlogShares

Clicky

Tuesday, November 14, 2006

Sensible tech shite

Re:And its still a PIG! (Score:5, Informative)

by RevMike (632002) Alter Relationship <[moc.liamg] [ta] [ekiMver]> on 20:16 Monday 13 November 2006 (#16823252)
Anytime I startup a Java program I want to run and hide due to fear that the pages being swapped out to make room for it will crush me where I stand. Maybe as open source software people will be able to look at it and ask *why* does it have to take up so much memory to do such simple jobs? Compare for example Azureus (in Java) to bittorrent (in Python).

You have to remember that you are starting up a full virtual machine environment. That is going to have lots of overhead, especially at initialization. Anyone who expects to run "Hello, World" programs efficiently is a fool.

Java really does well with big server apps, where the cost of initialization can be amortized over a long period of time. Additionally, JIT compilation and live profiling really work well here.

Server apps really do well with Java. There are fewer opportunities to create difficult to track bugs, memory management handles the fragmentation issues, etc. The performance delta between a C++ and a Java server app is often fairly negligible* while the development time is often substantially faster and it is easy to move to other platforms.

* - A well written C++ app built for a generic processor architecture and a long running Java server app will frequently run about the same. The C++ app is stuck with the tuning choices made at compile time, while JIT and profiling available in Java will tune the Java app at run time, making up for the overhead of the virtual machine. If the "Gentoo" model is followed - the compiler is carefully set to provide maximum performance for a given machine - the C++ app can run substantially faster. However, the cost is that the binary can no longer be moved to a similar but not identical machine without rebuilding. This tuning activity typically requires lots of time and expertise, and generally makes environmental management efforts prohibitively complex. These solutions don't make their way into most real world environments.

--
Java Blog for Experienced Programmers - http://www.0xCAFEBABE.com/
Comments: Post a Comment