Hi. I am a computer scientist. This is a comparison of memory usage for a simple hello world application between C, C++, and C#. Compiled VS2010 32-bit x86 Release.
PHP Code:
// C#
// 1,968k
using System;
namespace hellonet
{
class Program
{
static void Main(string[] args)
{
System.Console.Write("hello world");
System.Console.ReadKey();
}
}
}
PHP Code:
// C++
// 640k
#include <iostream>
int main(int argc, char* argv[])
{
std::cout << "hello world";
std::cin.get();
return 0;
}
PHP Code:
// C
// 484k
#include <stdio.h>
int main(int argc, char* argv[])
{
printf("hello world");
getchar();
return 0;
}
As you can see, C# uses 5x as much memory as C and 3x more than C++ just for a simple hello world application. And M$ is writing Windows.Next kernel in this managed language.
Rogean you can thank me for the adsense money from the future googlers that will find this site (as applies to all of my insights made here).