08.11.2010, 13:24
Thanks. Page 15 in your optimization topic has information about the parameter pass through code.
After learning the basics of PAWN, I learned most of the more advanced stuff by looking through YSI, btw.
Regarding memcpy: I was going to make a post about that in code optimizations. It is significantly faster than any other string copying method, afaik.
For reference, here are my results and how I got them:
Note: Never, ever actually use format to copy strings as it doesn't support all characters.
Code used to measure it here.
After learning the basics of PAWN, I learned most of the more advanced stuff by looking through YSI, btw.
Regarding memcpy: I was going to make a post about that in code optimizations. It is significantly faster than any other string copying method, afaik.
For reference, here are my results and how I got them:
Код:
String copying benchmark Bench for memcpy: executes, by average, 2208 times/ms. Bench for format: executes, by average, 1279 times/ms. Bench for strcpy 1: executes, by average, 142 times/ms. Bench for strcpy 2: executes, by average, 89 times/ms.
Code used to measure it here.