You are here

Coherent Cache, Incoherent Blog Entry

Once again the performance problems with Coldest have been held at bay by a significant breakthrough. It boggles my mind how many times I've had to double and then redouble the performance of this engine since I first started working on it, but I've managed to pull off another minor performance miracle. Actually it might be more accurate to say that I've corrected a minor performance debacle that was blowing my cache coherency to kingdom come. In my Mesh code I was allocating a bunch of vertices on the heap that didn't need to be on the heap, and once I moved them into a member vector performance nearly doubled.

There are still quite a few vertices that would probably benefit from being moved off the heap into a more cache-friendly structure, but that change wouldn't be as trivial as this one was. The other vertices still need to be allocated somewhere that multiple meshes can get at them, so I would either need to write some allocation/deallocation code that was aware of whether a Mesh was still using the vertices, or I need to find a data structure that would allow that. I suspect the latter is not going to happen (although Boost does have some pretty exotic data structures), so it would probably involve a fair amount of extra code to make this happen. Since performance is acceptable at this point, I think I'm going to put that off until it proves to be necessary.

Now to the incoherent part of this blog entry. Jim Leonhard is the man. The only thing that surprises me about his success in the NFL is that it took so long for someone to realize that the guy is incredibly athletic so his size isn't really a big deal. I'm looking forward to watching him through the rest of his career.

Speaking of people with interesting careers, I'm also a fan of Jeff Green. If you don't know who that is check out his [url=]Greenspeak blog[/url]. I miss listening to him on GfW Radio, but fortunately he hasn't stopped talking about games and the gaming industry.