Quote:
Originally Posted by 11530
Zephyrus, your version looks pretty slow to me. Unless you think integer addition is slower than using temp strings, multiple formats, StringToInts, ReplaceStrings, and needless if-statements - not to mention the fact your code won't detect other non-normal SteamIDs. Most of your code really isn't needed (and about 50% longer) - you should think twice before saying those functions are way better than basic addition/subtraction. Please think again before posting code which is very similar to a post someone made a year ago too.
Just to confirm your code however, I've ran a quick profile on it, running each function 100,000 times. Twice.
Your code - Avg. Time: 0.081687 then 0.094406 (0.0880465 total avg.)
My code - Avg. Time: 0.072591 then 0.067664 (0.0701275 total avg.)
Profilers are never complete proof, but at least it stops you, Zephyrus, from using awkward phrases like "this is way better".
|
To be honest, Zephyrus's version could probably be optimized by replacing the Formats with strcats and IntToStrings as appropriate, but I'm too lazy to see if it actually makes a difference.
__________________