C++ or C#

Started by
222 comments, last by GrouchyIssues4 20 years, 5 months ago
quote:Original post by Anonymous Poster
Ogre isn't exactly fast so that comparison is not the best one. The performance is nowhere near what most commercial engines (like lithtech)are capable of.



How did I know somebody would say this =] It doesn't matter what OGRE's performance is compared to others.

What you said has no relevance at all. OGRE and Axiom have equal performance results even though one is written in C++ and one is written in C#.

You could take Lithtech and re-write it in C# and you would have the same performance scale as ORGE->Axiom.


[edited by - Imperil on November 20, 2003 12:34:16 PM]
Advertisement
quote:Original post by Imperil
You could take Lithtech and re-write it in C# and you would have the same performance scale as ORGE->Axiom.


Hardly, different engines, different programming paths.
You should know that. You are comparing apples and oranges.
You only need to compare the c# managed dx samples in dx9 sdk with the c++ ones. In one case c# is actually faster. In most cases the reverse is true. I many cases by 15-20%.
quote:Original post by Anonymous Poster
quote:Original post by Imperil
You could take Lithtech and re-write it in C# and you would have the same performance scale as ORGE->Axiom.


Hardly, different engines, different programming paths.
You should know that. You are comparing apples and oranges.
You only need to compare the c# managed dx samples in dx9 sdk with the c++ ones. In one case c# is actually faster. In most cases the reverse is true. I many cases by 15-20%.


Actually you are the one comparing apples to oranges. It does not matter which engine I choose, I am comparing languages not commercial engines.

Also you are very uneducated on managed C# if you are going by the DirectX SDK samples.

"You only need to compare the c# managed dx samples in dx9 sdk with the c++ ones. In one case c# is actually faster. In most cases the reverse is true. I many cases by 15-20%."

You are comparing an unfinished language to a finished one. First off many of the C# samples are written just plain badly. Plus any version of C# under 2.0 using containers or sorting takes a very large speed hit due to boxing/unboxing.

Tom Phillips (managed DX lead software engineer) has stated many times that people shouldn't be comparing the C# SDK samples to the C++ SDK samples.

The fact is that the Billboard demo in the SDK takes a HUGE performance hit due to the fact of not having generics. Once re-written in generics it is approximately 3-4% slower than unmanaged C++.

You should get the facts before comparing =]

[edited by - Imperil on November 20, 2003 2:59:46 PM]
quote:Original post by Imperil
Actually you are the one comparing apples to oranges. It does not matter which engine I choose, I am comparing languages not commercial engines.

What do you mean it doesn''t matter which engines you choose?

Damn, if that''s the case, let me write a nice engine in C# that runs at about 1 fps and you compare that to OGRE to see which language is faster. It does matter which engine you choose...


- Houdini
- Houdini
quote:Original post by Houdini
quote:Original post by Imperil
Actually you are the one comparing apples to oranges. It does not matter which engine I choose, I am comparing languages not commercial engines.

What do you mean it doesn't matter which engines you choose?

Damn, if that's the case, let me write a nice engine in C# that runs at about 1 fps and you compare that to OGRE to see which language is faster. It does matter which engine you choose...


- Houdini



umm I have no idea what you are talking about.

No when I am COMPARING LANGUAGES it does not matter which engine I choose. Axiom is the C# representation of Orge, and it doesn't even have generics yet and so it has boxing/unboxing issues until 2.0 is released!

I have no idea why you would want to right an engine in C# that runs at 1fps and compare it to OGRE.. maybe enlighten me?

Considering that Axiom is basically a PORT of OGRE to the C# language =]

For you guys that have not learned how to compare things yet. Basically you do this:

1) Find an application written in C++
2) Port the application to C#
3) Check the FPS on the C++ verison
4) Check the FPS on the C# version

That is how you compare and benchmark. I do not take a commercial C++ 3D engine and compare it to an independant C# 3D engine developed by 2 people =]

[edited by - Imperil on November 20, 2003 3:25:26 PM]
quote:Original post by Anonymous Poster
Doesn''t anyone cares that C# is proprietary? and that it runs only in windows? I mean, you guys should think that there are a lot of other operating systems out there.


[offtopic]

I am a happy user of mono (www.go-mono.com), a free - gpl - .NET implementation for Linux and other platform. It is currently advanced enough to make quite fun/good games, especially in combination with SDL.NET and/or managed OpenGL libraries.

C# is commited to the ECMA and is now an ''open'' standard. Microsoft can ofcourse make changes and commit them, but the standard is and shall be open.

[/offopic]

[ontopic]

As i stated above, I already use C# for game programming. It is quite fast, even on a beta mono version on Linux. Note that Linux is my primary development platform, and at work when I''ve got nothing to do I continue with my work with SharpDevelop. Also very nice.

Note that I also do program in C++ occasionaly, especially when working on older programs/little games.

[/ontopic]

[n00bflames]

c# is vry c00l realy u should see
i haet c++ it is stup1d

[/n00bflames]
Ah, you never mentioned that Axiom was a port of OGRE. All you said was that it had comparable features. Even the website doesn''t mention it''s a port (at least I couldn''t find any such statements).

This is why the AP and myself questioned your comparison.


- Houdini
- Houdini
^^^^

As the above AP stated, the mono .NET framework for Linux is very advanced. I remember watching when the project just started along.. it has had amazing progress.

I would also like to add that Microsoft alone did not draw up the standards for C# and they do not own the language.

Microsoft, Intel, and Hewlett-Packard are the ones that originally proposed C# to the standards comittee.
quote:Original post by Houdini
Ah, you never mentioned that Axiom was a port of OGRE. All you said was that it had comparable features. Even the website doesn''t mention it''s a port (at least I couldn''t find any such statements).

This is why the AP and myself questioned your comparison.


- Houdini



Sorry about jumping on you then, I should have mentioned that it was in the post. =]

And as you can see C# Axiom actually surpasses C++ OGRE in some areas (just as well OGRE surpasses Axiom in some areas). It just goes to show that with C# 2.0 and generics a lot of the current bottlenecks will be fixed, along with some parts of C++ OGRE will be fixed (they already know where a few bottlenecks are and are working on them).

I believe that once both are optomized we will see Axiom running at about 97-98% the performance of OGRE on an unmanaged system... even though Axiom currently outperforms OGRE. On a managed system Axiom should surpass OGRE, but I would say anyone stating numbers on the performance amount is just guessing and pulling numbers out of thin air.. as it really can''t be known until .NET 2.0, C# 2.0, and Longhorn =]
The thread title is misleading. Education is learning what you didn''t know you didn''t know and I still think the OP should learn Scheme first -even though they may never have heard of it before.

Learning how to program shouldn''t be restricted to learning the most marketed languages around -even though they may be useful for certain things.

Even the staunch C# supported hailed Scheme as being wonderful. Please, OP, learn Scheme so we don''t have to answer even more questions about boiler plate code.

This topic is closed to new replies.

Advertisement