28.10.2017, 22:14
Quote:
Not sure where you got 20% from, my estimate would have been closer to 2000% slower - they are function calls instead of pawn operations (opcodes), a since a single function call takes multiple opcodes, they can't be that close. How far off are they? I did some tests:
https://gist.github.com/Y-Less/7f815...ece8386cfbfe28 Results: Код:
||========================|| || STARTING PROFILINGS... || ||========================|| Timing "ReadGVars"... Mean = 4541.00ns Mode = 4556.00ns Median = 4556.00ns Range = 188.00ns Timing "ReadGlobals"... Mean = 268.00ns Mode = 268.00ns Median = 268.00ns Range = 5.00ns Timing "ReadLocals"... Mean = 285.00ns Mode = 284.00ns Median = 284.00ns Range = 8.00ns Timing "ReadPVars"... Mean = 3918.00ns Mode = 3920.00ns Median = 3920.00ns Range = 26.00ns Timing "ReadProperties"... Mean = 6791.00ns Mode = 6788.00ns Median = 6788.00ns Range = 26.00ns Timing "ReadSVars"... Mean = 3823.00ns Mode = 3823.00ns Median = 3823.00ns Range = 24.00ns Timing "WriteGVars"... Mean = 5755.00ns Mode = 5741.00ns Median = 5753.00ns Range = 40.00ns Timing "WriteGlobals"... Mean = 257.00ns Mode = 255.00ns Median = 255.00ns Range = 21.00ns Timing "WriteLocals"... Mean = 282.00ns Mode = 281.00ns Median = 281.00ns Range = 20.00ns Timing "WritePVars"... Mean = 4122.00ns Mode = 4120.00ns Median = 4117.00ns Range = 57.00ns Timing "WriteProperties"... Mean = 9890.00ns Mode = 9836.00ns Median = 9850.00ns Range = 243.00ns Timing "WriteSVars"... Mean = 4188.00ns Mode = 4168.00ns Median = 4182.00ns Range = 63.00ns *** Profilings: 12 ||======================|| || PROFILINGS COMPLETE! || ||======================|| |