Page 2 of 3

Posted: Mon Dec 04, 2006 3:32 pm
by srod
I Deeem ( :) ) the writing of PB.Net a major achievement.

Anyone who successfully creates a compiler gets my respect.

Posted: Mon Dec 11, 2006 10:27 pm
by Deeem2031
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)

Posted: Tue Dec 12, 2006 10:50 am
by Derek
Thanks, will give the non .NET version a try.

Posted: Tue Dec 12, 2006 11:02 am
by bembulak
I like .NET, especially the way it looks like on Windows. And .NET is OOP.
If you can make the PB.NET-compiler running on Linux (with Mono) stable, I would buy it! Please keep up the work!

Posted: Tue Dec 12, 2006 11:50 am
by Derek
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?

Posted: Tue Dec 12, 2006 4:10 pm
by Flype
this is really interessant.
i tried the x86 optimizer and it increase a lot the speed (with your snippet).

Posted: Wed Dec 13, 2006 4:55 am
by JCV
Is this safe to use on projects?


[edit]
It doesnt work on my project. :cry:
14596 lines processed.
Creating executable.
Error: Assembler

Posted: Wed Dec 13, 2006 11:27 am
by Trond
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)
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.

Posted: Wed Dec 13, 2006 2:57 pm
by Deeem2031
>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.

Posted: Wed Dec 13, 2006 3:02 pm
by Derek
Ok, thanks for the reply, will watch this space. :D

Posted: Wed Dec 13, 2006 4:41 pm
by thefool
Using the .net optimizer and i have tested many times.

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))
12.5 sec's optimized
11.8 sec unoptimized :lol:

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 q
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 :)

Posted: Wed Dec 13, 2006 5:24 pm
by Deeem2031
@thefool: The strange thing is: The optimizer does not change anything by using this code - so there should be no difference.. :?

Posted: Wed Dec 13, 2006 5:25 pm
by Trond
.Net sucking up resources!

Posted: Wed Dec 13, 2006 5:26 pm
by thefool
Trond wrote:.Net sucking up resources!
Can't be :)
@thefool: The strange thing is: The optimizer does not change anything by using this code - so there should be no difference..
exactly!

Posted: Wed Dec 13, 2006 6:27 pm
by Flype
And suddenly im annoyed i can't do this:

Code: Select all

a=10
For q=1 To Pow(a,2)
Debug ja
Next q
Is that a PB bug? just asking if anyone noticed it..
1/ Pow() return a float.
2/ For/Next is intended to be used with longs.

so imho it's by design, not a bug.