Contents
The Top 10 Myths of Video Game Optimization
 
 
Printer-Friendly VersionPrinter-Friendly Version
 
Latest News
spacer View All spacer
 
November 22, 2009
 
Video Game Watchdog National Institute On Media And The Family Shutting Down [11]
 
Modern Warfare 2 Infinity Ward's 'Most Successful PC Version' Yet [12]
 
New Tech, Design Details Of Project Natal To Emerge At Gamefest In February
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
November 22, 2009
 
Trion Redwood City
Sr. Evnironment Modeler
 
Trion Redwood City
Sr. Environment Artist
 
Sucker Punch Productions
3D Environment Artist
 
Sucker Punch Productions
Network Programmer
 
Sucker Punch Productions
Character Artist
 
Sucker Punch Productions
Texture Artist
 
Monolith Productions
Sr. Software Engineer, Engine - Monolith Productions - #113767
 
Sony Online Entertainment
Brand Manager
spacer
Latest Features
spacer View All spacer
 
November 22, 2009
 
arrow Upping The Craft: Susan O'Connor On Games Writing [6]
 
arrow Small Developers: Minimizing Risks in Large Productions - Part II [7]
 
arrow iPhone Piracy: The Inside Story [48]
 
arrow And Yet It Grows: Analyzing the Size and Growth of the European Game Market [5]
 
arrow NPD: Behind the Numbers, October 2009 [13]
 
arrow Reflecting On Uncharted 2: How They Did It [5]
 
arrow Sponsored Feature: Rasterization on Larrabee -- Adaptive Rasterization Helps Boost Efficiency
 
arrow Postmortem: Wadjet Eye's The Blackwell Convergence [2]
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
November 22, 2009
 
Time Fcuk
 
Accepting the Inherent Value of Games
 
Planckogenesis, Part II: Song Structure & Gravy Train [1]
spacer
About
spacer News Director:
Leigh Alexander
Features Director:
Christian Nutt
Editor At Large:
Chris Remo
Advertising:
John 'Malik' Watson
Recruitment/Education:
Gina Gross
 
Features
  The Top 10 Myths of Video Game Optimization
by Eric Preisz
0 comments
Share RSS
 
 
September 13, 2007 Article Start Previous Page 3 of 4 Next
 

Myth 6: Optimization And Assembly

For many programmers, optimization and assembly are synonymous. This is much less true today than it was in the past. If this inflames you, don’t think that I believe there is NO place for assembly in optimization; it’s just a smaller piece.

My justifications?

Advertisement

First, the use of APIs is much more prevalent today than in the past. In many programs, the application code written by the developer consumes a small percentage of the total runtime. It is very common for the drivers, graphics bus, or the graphics pipeline to be the 20% of the Pareto principle.

When the code you use, not the code you write, is the hotspot or bottleneck, coding with optimized assembly ( excluding shader assembly ) will not be your most efficient use of time. We have sacrificed a lot of control for code reuse through APIs.

Second, optimizing for assembly is a classic example of a micro optimization. A micro optimization is more likely to have different results across PC configurations than system or application optimizations. Everyone is familiar with the office phrase, “It doesn’t crash on my machine”. Micro optimizations sometimes stimulate the phrase, “It runs fast on my machine”.

Finally, when you write assembly, you get exactly what you write. To some, this is great. To those who are not experts in assembly, it’s an opportunity to shoot yourself in the foot. The term “optimizing compiler” is antiquated. Now, even standard compilers contain optimizations. Writing assembly bypasses the optimizations ingrained in compilers. Even text book examples of non-data dependant loop unrolling yield slower performance than that of pristine loop. The risk vs. reward of pigeon-holing your compiler is not as justified as it was in the past.

In closing this myth, I will again repeat that there is a place, under the correct circumstances, that optimizing with assembly is still the correct choice. For those who prefer a higher level language, it’s good to know that compilers are doing more of our work.

Myth 7: A Ratio Of 1 To 1, Thread To Logical Core, Is Optimal

Ok, so maybe I’m getting a bit nit-picky. This statement is common, but more detail must be applied to stop confusion. If using Microsoft Windows XP, you will find that on start-up, your machine will be running anywhere between 400 to 800 threads. Does this mean we are never going to achieve the ratio until we have an 800 core machine. Of course not.

A more accurate phrase is, “a ratio of 1 to 1 intensive threads is optimal”. Two threads, running at 50% can share one core efficiently. The difficulty in this example is to ensure that the executing 50% does not occur at the same time for both threads.

Myth 8: Multi-threading With Efficient Synchronization Will Always Increase Performance

This myth is related to myth 5 and is likely to go away as multi-core systems memory architectures evolve. The root of this myth is that multi-threading does not increase memory performance, it complicates it.

If a given algorithm is bound by memory performance, then dividing the task across threads will not increase the performance. And by opening the door to false sharing and increased cache eviction, the potential for a decrease in performance exists.

 
Article Start Previous Page 3 of 4 Next
 
Comments

none
 
Comment:
 


Submit Comment