View Single Post
Old 09-12-2009, 07:28 PM   #23
Element Tower Defense
Karawasa's Avatar
Join Date: Feb 2006
Posts: 1,094

Submissions (2)

Karawasa has a spectacular aura about (78)Karawasa has a spectacular aura about (78)Karawasa has a spectacular aura about (78)

Approved Map: Tropical TagApproved Map: Element TD

Send a message via AIM to Karawasa Send a message via MSN to Karawasa

Originally Posted by Rising_Dusk
Well, UIU/AI inlining their GetUnitId call makes it as fast as a single native. PUI's GetUnitIndex calls a few natives, performs several array lookups, performs several array sets, and checks at least a few if/then comparisons before returning the value. The difference is monumental, although in practical applications it may not matter. (Depends upon the frequency of your calling it, really)

Yes, I noticed that "GetUnitIndex" is bloated compared to "GetUnitId" function. What I am still wondering about is the recycling and detection aspect of these systems. Is PUI more efficient regarding these other aspects? If so, does it make up for the performance loss described above?

I use PUI extensively and call it a lot. In fact, anytime a tower attacks or a unit is damaged (notice these are not the same) PUI gets called. If the performance difference is actually noticeable and significant (as opposed to some theoretical nanosecond stuff I don't care about) then I have a problem. However, I'd like to know about recycling and detection before changing to another system.

Element Tower Defense - Premier WC3 Custom Game
Karawasa is offline   Reply With Quote