I have been using Angelscript version 2.19.2 for quite a while. I am in the process of porting an application to Linux and decided to download the latest library 2.26.2. To test the two versions I was using the tutorial sample with the LineCallback not registered to increase performance (simple commented out the registration code). I modify the script.as file in the tutorial to include this loop
double x = 0.00;
int64 startTime = GetSystemTime();
for(int i=0; i<10000; i++)
{
x += i * 1.23 + 4.56;
}
int64 endTime = GetSystemTime();
Print("Total time = " + (endTime - startTime)/1000.0 + "\n");
In version 2.19.2 this takes about 1ms on a 2.8GHz machine. Version 2.26.2 takes about 4ms.
When compiling the tutorial for version 2.19.2 I got the following error. I simply commented out this line for now.
g++ -ggdb -I../../../../angelscript/include -D_LINUX_ -o obj/scriptstring.o -c ../../../../add_on/scriptstring/scriptstring.cpp
../../../../add_on/scriptstring/scriptstring.cpp: In function ‘void RegisterScriptString_Native(asIScriptEngine*)’:
../../../../add_on/scriptstring/scriptstring.cpp:646:86: error: invalid static_cast from type ‘<unresolved overloaded function type>’ to type ‘bool (*)(const string&, const string&) {aka bool (*)(const std::basic_string<char>&, const std::basic_string<char>&)}’
make: *** [obj/scriptstring.o] Error 1
I haven't tried any of the other versions yet. Were there any major changes that would affect the loop performance?
Thanks,
Tony