Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C++ does not perform, is not a managed language, and has nothing to offer. What could he possibly be talking about?

I read this as MS once again getting it completely wrong. Seriously C++ solving managed languages performance and memory problems?

Physician, HEAL THY SELF.



> C++ does not perform,...

You sure seem to be an expert on these things.


He could be Torvalds, I guess. :)


I don't think Torvalds has said C++ is slow, just that the language is shitty compared to C.


Computer games which are impacted by performance the most are written in what language?


I doubt that C++ is chosen because of raw performance (both C# and Java are close enough), but mostly because of memory and cpu cycle determinism.


>I doubt that C++ is chosen because of raw performance

As long as you're guessing, you can say anything you want.

>but mostly because of memory and cpu cycle determinism.

There is SOME memory determinism in C++. Much of the memory layout is left unspecified in the standard and left upto the implementations - e.g. virtual tables, exceptions, C++ standard library internals, primitive data type sizes, and a bunch of stuff that if listed one-per-line would take up dozens of pages.


>"(both C# and Java are close enough)"

Not really, a GC call in the middle of your render loop can drop your FPS rate significantly, and those cpu cycles are vital when you start adding physics simulation, not to mention the limitation of memory on consoles.

Sure, Java and C# would be enough for minecraft or some xbox live puzzle game, but I really doubt that you could manage to write an Uncharted game in Java or C# on a PS3 or an Xbox.


A GC call cannot drop your FPS a lot, but it could add a lot of latency spikes and inconsistent framerates. Techreport's inside the second is amazing read on the subject.

So ... you will have slightly lower FPS (55 instead of 60) but much worse experience.


Does it have anything to do with history? Given Java relying on JVM and in the beginning JVM's performance probably wasn't so good, game libraries were probably written in C, C++ and then nobody wanted to rewrite game engines because gaming industry is really fast-pace and very very busy.


Both: Manual memory management and library support.


C/C++ though game engines usually support higherlevel languages like Lua or Python.


The entire logic of most games is written in slow-ass languages like UnrealScript or LUA.

The runtimes of the games are often code monstrosities wasting performance here and there.

Performance is way over-rated.


C with classes




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: