Sign in to follow this  
I_Smell_Tuna

Assembly

Recommended Posts

I_Smell_Tuna    96
I was reading a book the other day and it said that the renderer for Red Faction was converted from C/C++ to assembly an achieved a performance increase of 2.5 times. Not that this would be practical, but out of curiosity, with assembly language being a lower level and generally much faster language, how much of an overall performance increase could you expect if you converted an entire game such as Doom 3, or Half-life 2 from their primary language to assembly?

Share this post


Link to post
Share on other sites
Monder    993
Languages generally aren't inherently fast or slow. The speed aspect comes out of how you actually use the language and how good your compiler/interpreter or whatever is. A modern compiler can do a rather good job of optimisation. In some areas (which you would identify with a profiler) you may be able to provide a speed-up by writing stuff in ASM but blindly converting your entire renderer to ASM is not that likely to give you a huge speed up.

Share this post


Link to post
Share on other sites
I_Smell_Tuna    96
I'm aware that writing sloppy code degrades performance but when you code with a lower level language there is less to interpret because of less overhead.

Share this post


Link to post
Share on other sites
Kwizatz    1392
The performance increase from assembly comes from optimizing the bottlenecks by taking the ASM your compiler generates at said bottlenecks and tweaking them manually, that, and converting mass math operations such as matrix and quaternion multiplications to MMX,SSE,3DNow,SSE2 or 3dNow2.

So, What Monder said [smile]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this