Joshua Grass, PhD
Many advanced scripting languages have notions of class hierarchies similar to those in programming languages such as C++, C#, or Java. Scripts written in these languages often need to perform safe casts or IsA checks on objects. In our game, This Is Vegas, we found that the amount of time spent performing the IsA check was not insignificant. This gem describes a method for processing class hierarchy data to change the IsA operation from O(N) to O(1). In our case, this resulted in a performance improvement of more than one percent for the cost of adding one
DWORD for each class (depending on your platform; if the platform does not have the
BitScanReverse operator, you will need to store ...