garrysmod
garrysmod copied to clipboard
Change pairs to ipairs
A micro optimization to save some nanosecs of cpu
It's better but not faster as it will not jit compile and outside or jit compiled mode, pairs is faster than ipairs
This will be faster in x86_64's JIT.
It's better but not faster as it will not jit compile and outside or jit compiled mode, pairs is faster than ipairs
Didn't know that, does it have a reason to jit compile pairs but not ipairs?
It wouldn't compile in both cases. But pairs apprently is faster in non-JITted code. The possible reason is the implementation, I didn't look deeper but I assume this.
Superseded by https://github.com/Facepunch/garrysmod/pull/1609