Posted 15 years ago on 8/6/2009 and updated 9/27/2009
Take Away:
With Microsoft heavily evangelizing .NET, and Sun continuing to improve Java, many a developer and customer are torn between targeting native machine code or a just-in-time compiler.
Here we take a quick look at that particular state of the union...
With Java, Sun--now owned by Oracle--declared it's "silver bullet," now practically a mantra, "write once, run anywhere." This, of course, has always been a kind of holy grail in software development. The benefits are obvious: A single source code base targeting multiple platforms means reduced development time, less testing time, less rework.
There is, of course, a price to pay, and it's in the area of raw performance. Everything else being equal (OS and machine resources), compiled, native machine code will always run faster than code that relies upon a runtime interpreter or JIT (just-in-time compiler). This is inescapable because the interpreter or JIT will consume machine cycles not needed by the native code equivalent.
That said, modern machines are so fast, so powerful, that it may make little difference - in some applications. Add to that the fact that the development tools for, say, Microsoft's .NET, are incredibly productive, and the choice of a runtime-dependent solution becomes quite compelling.
There remain, however, classes of programs that scream for every ounce of performance that can be had; databases, web browsers, sound editors, video editors, graphics editors, etc. But even "mere" desktop business applications can benefit from native code because the end user experience can be significantly more "snappy."
Programs like the sound editor, Audacity, Google's Chrome browser, and the core parts of Windows 7 are developed in native code. Even the wonderful Paint .NET, relies on a pile of native code in the form of DLLs from Nvidia.
If you'd like to explore more details about this debate, here are a couple good links:
I like the quote from MSDN Magazine June 2009 issue "Introducing Direct2D" where author sums it up:
(...) if you want to develop high-performance and high-quality commercial applications, you'll still look to C++ and native code to deliver that power. (...)
Of course, that's a Microsoft plug and, for native code, C++ is all they have to offer.
At Prestwood, we certainly do C++, but our native code mainstay is Delphi. Like a good C++ compiler, Delphi produces highly optimized native machine code. But Delphi's Object Pascal language (now simply called "Delphi") seems a lot more productive than C++.
The following is a good discussion thread in our
message boards as this subject relates to the future of Delphi for
Win32: