View Single Post
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 02-01-2020 , 12:53   Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced
Reply With Quote #14

Quote:
StringMap.FindString is slightly quicker than ArrayList.FindString and probably significantly faster for larger arrays.
But StringMap doesn't have a method named FindString.
StringMap API

Quote:
FormatEx instead of Format. When input and output buffers are the same.
When input and output buffers aren't the same.

Quote:
Storing cvar handles, using HookConVarChange and storing the returned cvar values in global variables is more efficient than constantly using GetConvar* calls.
I heard that GetConVar* natives cache their values so you don't need to use variables to store each value. (BUT i'm not sure 100%)
Checked C++ source for these natives and found nothing about caching.
__________________

Last edited by MAGNAT2645; 02-01-2020 at 13:00.
MAGNAT2645 is offline