Quote:Original post by basananas
It's nice to hear that learning assembly actually is important for making hotspots faster :)
Actually, no, it's not important in PC video game development. In PC games, the main bottleneck is rendering, and is performed by the 3D accelerator card. Therefore, you can fiddle with assembly as much as you want, you will only get minimal improvements because the time is really spent on rendering, which you can't fiddle fith in assembly.
To optimize rendering speed, you have to carefully select what you send to the graphics card, and in what order, and with what options. No assembly involved - only rearranging your rendering API calls, sorting your scene, and in general knowing what makes your favourite drivers and cards tick. The kind of difference I'm talking about here is getting 1 additional FPS from two hours working on the game update code, and 60 additional FPS after spending 10 minutes of coding on sorting polygons by material before rendering them.
With the scale of todays hardware, I'd even say it's not useful to optimize at low levels anymore on the (non-gaming) PC platform, unless you're really dying for speed. Back in the day, optimization meant keeping the game map and textures in cache, and it was hard because the cache was small. Today, for any practical purposes where execution speed is processor and memory bound, the scales involved are larger: the data sets are larger (Gigabytes of data are necessary to cause any real problems) and the resources are larger (a company work server can keep the Gigs above in RAM: it's cheaper to buy more RAM than to pay for the optimization time). Most of the tweaking today comes from large-scale optimizations, the kind that, in one strike and an hour's worth of coding, makes half your code twice as fast.
The only area where assembly is still useful today is handhelds: these things have no graphics card to render the game on, so it's back to basics and you actually have to render things yourself. Much precaching fun ensues as you try to optimize your pixel-rendering function.