Asked in Java Programming.NET Programming
Why java applications take more memory than c sharp and also execute slower?
July 20, 2009 12:32AM
The timing and memory usage would seem to depend on what you're doing.
In preparation for this answer, I ran several trials of a program in both Java and C#. The programs used the exact same algorithm to calculate all the prime numbers in [0, 100,000,000). In the six runs I did of each, the C# program took about 500ms longer and 16mb more RAM than the Java program.
As I said, this was one example. Hopefully more people will post their own benchmarks and results to help determine which language is more suitable in which situations.