Thread: [Plugin] GVar Plugin
View Single Post
Old 29/05/2010, 09:05 PM   #14
Incognito
Huge Clucker
 
Join Date: May 2006
Posts: 449
Reputation: 500
Default Re: [REL] GVar Plugin v1.0

$ЯĢ: Possibly, but I don't know what accounts for the differences in run time. I'm sure PVars use a different type of implementation that may be more efficient in terms of speed. I could try creating a hash table, which is much faster than the sorted binary tree this plugin currently uses. That should effectively change the complexity for lookups from O(log n) to O(1). However, as your tests revealed, both PVars and GVars were dozens of times slower than arrays, so if you're scripting something that is absolutely time critical (most PAWN scripts aren't), I would recommend not using these functions at all.
Incognito is offline   Reply With Quote