Project 1999

Go Back   Project 1999 > General Community > Rants and Flames

View Poll Results: Which do you like?
C 4 17.39%
C++ 15 65.22%
C# 9 39.13%
Multiple Choice Poll. Voters: 23. You may not vote on this poll

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-22-2012, 09:48 PM
Lucky Lucky is offline
Sarnak

Lucky's Avatar

Join Date: May 2012
Location: I don't give a h00t
Posts: 253
Smile C vs. C++ vs. C#

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 argccharargv[])
{
    
std::cout << "hello world";
    
std::cin.get();
    return 
0;

PHP Code:
// C
// 484k
#include <stdio.h>

int main(int argccharargv[])
{
    
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).
__________________

In your unfailing love, silence my enemies; destroy all my foes, for I am your servant.
Blessed be the LORD my strength, who teaches my hands for war, and my fingers to fight.
(Psalms 143:12-144:1)
Quote:
Originally Posted by Harrison View Post
To be fair he is making $$, which I can't fault him for. If cheating gets you real money, go for it. Real money > pixels.
[10:53] <@Amelinda> he grabbed my ass and then i broke his nose.
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:20 PM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.