Home » Developing U++ » UppHub » AngelScript - AngelCode Scripting Library
Re: AngelScript - AngelCode Scripting Library [message #34372 is a reply to message #34366] |
Sat, 19 November 2011 01:35 |
|
koldo
Messages: 3362 Registered: August 2008
|
Senior Veteran |
|
|
Hello Sender and Mirek
I have added Tcc code and the results are:
TIMING Tcc (fully interpreted, included compiling): 23.00 ms - 23.00 ms (23.00 ms / 1 ), min: 23.00 ms, max: 23.00 ms, nesting: 1 - 1
TIMING Tcc (interpreted): 20.00 ms - 20.00 ms (20.00 ms / 1 ), min: 20.00 ms, max: 20.00 ms, nesting: 1 - 1
TIMING AngelScript (fully interpreted): 169.00 ms - 169.00 ms (169.00 ms / 1 ), min: 169.00 ms, max: 169.00 ms, nesting: 1 - 1
TIMING AngelScript (interpreted): 485.00 ms - 485.00 ms (485.00 ms / 1 ), min: 485.00 ms, max: 485.00 ms, nesting: 1 - 1
TIMING Direct : 20.00 ms - 20.00 ms (20.00 ms / 1 ), min: 20.00 ms, max: 20.00 ms, nesting: 1 - 1
TIMING Compiled : 89.00 ms - 89.00 ms (89.00 ms / 1 ), min: 89.00 ms, max: 89.00 ms, nesting: 1 - 1
TIMING Interpreted : 2.20 s - 2.20 s ( 2.20 s / 1 ), min: 2.20 s , max: 2.20 s , nesting: 1 - 1
The code is:
try {
Tcc tcc;
tcc.Init();
//tcc.AddIncludePath(includePath);
//tcc.AddLibraryPath(libsPath);
tcc.Compile(script);
tcc.Link();
double (*calculate)(double, double) = (double (*)(double, double))tcc.GetSymbol("calculate");
RTIMING("Tcc (interpreted)");
double sum = 0;
for(x = 0; x < 1; x += 0.001)
for(y = 0; y < 1; y += 0.001)
sum += calculate(x, y);
RDUMP(sum);
} catch(Exc err){
Cout() << err;
}
try {
RTIMING("Tcc (fully interpreted, included compiling)");
Tcc tcc;
tcc.Init();
//tcc.AddIncludePath(includePath);
//tcc.AddLibraryPath(libsPath);
tcc.Compile(script2);
tcc.Link();
double (*calculate)() = (double (*)())tcc.GetSymbol("calculate");
double sum = calculate();
RDUMP(sum);
} catch(Exc err){
Cout() << err;
}
Best regards
IƱaki
[Updated on: Sat, 19 November 2011 01:37] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun May 19 14:37:50 CEST 2024
Total time taken to generate the page: 0.00732 seconds
|