"The 1990's sure aren't like the 1980's." -Donald Trump



   
BentUser Updates Feed     


Featured Articles
iPhone 3G Review, Gripes and Praise: Part I
Xbox Live Arcade 2008 Preview: Part I
Resident Evil 5 Preview
Customer Service?
The Fallout from Sony’s E3 Press Conference
Windows XP and Vista b5270 Side-by-Side
DRM Hell
Sharp XR-10X LCD Projector Review
Xbox 360 Launch
Microsoft BOB Review
Logitech V200 Wireless Notebook Mouse
Office 12 Screenshot Gallery
Apple Thinks Same, Goes Intel
Microsoft Windows Vista Build 5231 Indepth Look - Part 2
Why Google is Being Sued by Publishers
Microsoft Windows Vista Build 5231 Indepth Look - Part I
Comprehensive Tablet PC Review with the HP tc1100
Microsoft Virtual Server 2005 Review
IBM / Lenovo ThinkPad T43 Review
Windows OneCare Live Preview
OpenOffice 2.0 Writer Beta Preview
Windows Mobile 5.0 Preview
Battle of the Betas: IE7 vs. Firefox 1.5
Unicomp Customizer 101 Keyboard Review
Dell UltraSharp 24" Widescreen LCD Monitor - 2405FPW Review
Yahoo! Music Engine First Look
TopDesk Review
More
 
  .NET 2.0 vs. Java 1.5 Shootout
  By Andy

  Front > Software
  11/4/2005
  Specifications    Images    

 

Test 2 – Memory Efficiency

One feature of managed code is dynamic, and automatic, memory management.  While easing the complexities of the development process by abstracting out memory management significantly, memory managers add overhead.  Both .NET and Java use more memory to store the same data in RAM than the venerable C/C++.

In this test, we will pit the memory managers of Java against .NET in comparative memory allocation tasks under Windows XP.

The first comparison compares the memory required to allocate 100,000 floating point elements (double).  Please note that this first test is meant more as a baseline to establish how much base memory overhead there is than as a direct comparison:

Baseline Memory Comparison
Baseline Memory Comparison 

Memory was measured by computing the total amount of memory used by the process.  Here, things are fairly close.  The double type in Java 1.5 is a 64-bit IEEE 754 value, while in .NET the double data type is also a 64-bit IEEE-compliant value.  The memory was allocated in an array structure.  This array was initialized with values to ensure that real rather than "virtual" memory was allocated.  Now that we have established an overhead baseline, let’s up the number of elements to 5 million:

Memory Comparison 2
Memory Comparison 2 

Again, we have a clear winner – Java 1.5.  Note that all of our graphs start at zero to give as fair a comparison as possible.  .NET is using more than twice the amount of memory Java uses to store the same amount of data – 19.9 MB versus a whopping 47.8.




Previous      Next  
[ Introduction & Test 1 ] [ Test 2: Memory Efficiency, Continued ]
 

 

Contact Us        Links:  NLP APIs      




Copyright � 2005 Retro Reviews LLC.  All Rights Reserved.
Technorati Profile