Anyone who successfully creates a compiler gets my respect.
Just another PureBasic Optimizer (v2.01)
Just tried the x86 version and, using your example, I get 563 unoptimised and 266 optimised.
A great improvement, thanks for sharing.
Will there be any more optimisations on the way?
Incidently, I noticed that if the debugger is on then there isn't any change in the time taken to run your test, is this normal?
A great improvement, thanks for sharing.
Will there be any more optimisations on the way?
Incidently, I noticed that if the debugger is on then there isn't any change in the time taken to run your test, is this normal?
Does this mean that optimizer generated incorrect code or are you just talking about the crash on input file not found? If it generated incorrect code then that's not good for an optimizer.Deeem2031 wrote:Thx for the posts, even when most of u dont like the idea of PB.Net...
For everyone who dont like .Net, here's a new version (2.01) also downloadable as native x86 exe. Besides this there are just some bugfixes and the D_Optimizer.ini.
(Download see first post)
>Will there be any more optimisations on the way?
If i find anouth time i will implement more optimisations
>Incidently, I noticed that if the debugger is on then there isn't any change in the time taken to run your test, is this normal?
The Program does not find certain points with enabled debugger, because there is code between every line added. Also I dont think with debugger enabled sped is that important.
>Is this safe to use on projects?
It should be, but nobody is perfect..
>It doesnt work on my project.
:\
But without any code i cant find the bug. Maybe you try to disable some features in the D_optimizer.ini to try out which of then does not work correctly.
>Does this mean that optimizer generated incorrect code or are you just talking about the crash on input file not found? If it generated incorrect code then that's not good for an optimizer.
The optimized code was ok, there were just some sitiuations where the optimizer crashed.
If i find anouth time i will implement more optimisations
>Incidently, I noticed that if the debugger is on then there isn't any change in the time taken to run your test, is this normal?
The Program does not find certain points with enabled debugger, because there is code between every line added. Also I dont think with debugger enabled sped is that important.
>Is this safe to use on projects?
It should be, but nobody is perfect..
>It doesnt work on my project.
:\
But without any code i cant find the bug. Maybe you try to disable some features in the D_optimizer.ini to try out which of then does not work correctly.
>Does this mean that optimizer generated incorrect code or are you just talking about the crash on input file not found? If it generated incorrect code then that's not good for an optimizer.
The optimized code was ok, there were just some sitiuations where the optimizer crashed.
irc://irc.freenode.org/#purebasic
Using the .net optimizer and i have tested many times.
12.5 sec's optimized
11.8 sec unoptimized
Well i know the project isn't done but when i get worse times when optimizing, you need to look at some stuff hehe
And suddenly im annoyed i can't do this:
Is that a PB bug? just asking if anyone noticed it..
However, i find .net interesting and i will definently try screwing around with your compiler when it gets out
Code: Select all
a=10
b=20
c=50
awe=Pow(c,4)
;now lets ROCK
power=GetTickCount_()
For v=1 To awe
For i=1 To a
q=Pow(b,i)
Next i
Next v
unpower=GetTickCount_()
MessageRequester("",Str(unpower-power))11.8 sec unoptimized
Well i know the project isn't done but when i get worse times when optimizing, you need to look at some stuff hehe
And suddenly im annoyed i can't do this:
Code: Select all
a=10
For q=1 To Pow(a,2)
Debug ja
Next qHowever, i find .net interesting and i will definently try screwing around with your compiler when it gets out
1/ Pow() return a float.And suddenly im annoyed i can't do this:Is that a PB bug? just asking if anyone noticed it..Code: Select all
a=10 For q=1 To Pow(a,2) Debug ja Next q
2/ For/Next is intended to be used with longs.
so imho it's by design, not a bug.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer



