Open RodrigoMSR opened 2 years ago
Can you attach the code of your tests so that I could try it myself?
Code:
#include <a_samp>
main()
{
SetTimer("TestCallTime", 1000, true);
}
forward TestCallTime();
public TestCallTime()
{
new tick = GetTickCount();
for(new i = 0; i < 1000000; i++)
{
CallLocalFunction("TestPublic", "");
}
printf("%dms", GetTickCount() - tick);
return 1;
}
forward TestPublic();
public TestPublic()
{
return 1;
}
Results: ~120ms without plugins ~730ms with streamer plugin (v2.9.5)
I ran some tests and realized that sampgdk hooks make public function calls 4 times slower, wouldn't it be possible to further optimize these hooks? I understand if that's not possible, I'm just raising the question.
The streamer plugin uses sampgdk, that's why I noticed this difference.