Switched the managed JQuad container implementation from a vector to a map. This speeds up the cache lookup time from O(n) to O(log n). Hard to see a noticeable difference on win, but it definitely feels snappier on my psp, for instance, when browsing your library for a card, or your graveyard, etc.

I'm also noticing that the GetQuad(int) variant never seems to get hit, so I suspect that the ID lookup map is redundant.  I left it alone as the JResourceManager base class forces the need for the function; I need to spend more time looking at just how much of JResourceManager we actually use at this point.
This commit is contained in:
wrenczes@gmail.com
2010-10-17 16:54:08 +00:00
parent 1071dbf738
commit 832f11c153
3 changed files with 58 additions and 42 deletions

View File

@@ -24,6 +24,7 @@ using namespace std;
#define INVALID_ID -1
#define ALREADY_EXISTS -2
class JRenderer;
class JSample;