int sum1(int a, int b)
{
return a+b;
}
int fact(int n)
{
if(n>1)
return n * fact(n-1);
else
return 1;
}
void main()
{
for (int i = 0; i < 1000000; i++)
{
int sum = 0;
sum +=sum1(sum,i);
fact(5);
}
msgstr = "hello1";
}
I am really impressed.
I started fooling around with some some scripts today, to determine for myself the speed at which they execute, and i have to say, i am REALLY impressed with the WIP4.
This is the script i used and it executes in about 2 seconds.
It results in 5 MILLION fact! calls and a total of 6 million function calls.. I think AS is really really fast now.
Thanks :D
WIP5 is even faster. I optimized the C++ VM so that it is even faster than the ASM VM. The ASM VM can be optimized even more, but that hasn't been done yet.
Lioric, who wrote the first ASM VM, is also developing a JIT compiler, which should have a performance much closer to pure C++.
WIP5 is even faster. I optimized the C++ VM so that it is even faster than the ASM VM. The ASM VM can be optimized even more, but that hasn't been done yet.
Lioric, who wrote the first ASM VM, is also developing a JIT compiler, which should have a performance much closer to pure C++.
its good to see that :)
In the next weeks, i will take a look again to the VM and do some optimizations that i didnt include because i wanted the asm VM to be tested before that
And some big plans for AS2 ......
Lioric
In the next weeks, i will take a look again to the VM and do some optimizations that i didnt include because i wanted the asm VM to be tested before that
And some big plans for AS2 ......
Lioric
Is that piece of code 'actually' compiled?
I mean, in most program i've created using the Visual C++ Toolkit 2003 free compiler with the /O2 optimization flag, when i do something like that(call funtions whose results aren't stored or displayed) the compiler just doesn't include the funtion calls.
Have you tried creating a big array to store the results of fact(), and the results of sum(), and displaying the results afterwards?
I mean, in most program i've created using the Visual C++ Toolkit 2003 free compiler with the /O2 optimization flag, when i do something like that(call funtions whose results aren't stored or displayed) the compiler just doesn't include the funtion calls.
Have you tried creating a big array to store the results of fact(), and the results of sum(), and displaying the results afterwards?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement