Just another Purebasic Optimizer - New release - JaPBo v1.14

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

@dmoc:

The test.pb is written for remi_meiers optimizer. The log of jaPBo for this code says:

"0 lines removed
0 lines modified
0 lines added"

So my optimizer doesn't optimize something in this code.

Maybe you try this. There something to do for my optimizer ;)

Code: Select all

Global a,b,c,d,e,zahl,i2,c,f.f,z
Procedure Integer()
  c - a / d
  c = a % 2
  a % 2
  a = b * 3
  a * 5
  zahl = i2/e
  zahl = -i2 - -c
  zahl * 576
  zahl * 2005
  zahl * 10
  zahl * 20
  zahl * 36
  zahl * 1399
  zahl * 417
  zahl * 427
  PeekL(@c)
  PokeL(@c,2)
  Red(c)
  Green(c)
  Blue(c)
  RGB(a,b,c)
  PeekB(@c)
  PokeB(@c, 2)
  PeekW(@c)
  PokeW(@c,23)
  PeekF(@c)
  PokeF(@c, 2.0)
  ACos(f)
  ASin(f)
  ATan(f)
  Int(f)
  Log(f)
  Log10(f)
  n = f
  ; Austausch von Variablenwerten
  a = b
  b = c
  c = a
  
  
  If a % 2
    
  EndIf
  
EndProcedure

a = 5
b = 6
c = 7
d = 3
e = 1
zahl = 1
i2 = 1
c = 5
f.f = 10.0
#N = 5999999
z.l
Delay(1000)

time1 = ElapsedMilliseconds()
For z = 1 To #N
  Integer()
Next
time1 = ElapsedMilliseconds() - time1


MessageRequester(Str(zahl), Str(time1))
>PS: Also getting a dos window with the latest (so not seeing any progress bar)

Hm, strange. Any other get this error?
irc://irc.freenode.org/#purebasic
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

Yeah, stupid me, small variations are probably just usual bg processing. I'll give your version of Test.pb a go later. Cheers.
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

Version 1.12

new:
-eliminate double string-ends (optimize the size / doesnt affect on speed)
-some other little things
irc://irc.freenode.org/#purebasic
techjunkie
Addict
Addict
Posts: 1126
Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:

Post by techjunkie »

Deeem2031 wrote: Maybe you try this. There something to do for my optimizer ;)
:?:

Without optimizer: 9293
With optimizer: 9423

( Fasm 1.58 )
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

Without optimizer: 4903
With optimizer: 4823

If there were more Procedures the difference would be more distinct.
irc://irc.freenode.org/#purebasic
Armoured
Enthusiast
Enthusiast
Posts: 365
Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:

Bug

Post by Armoured »

Hi :)
I have problems with the instruction CreateFile() after I have optimized his return value is always 0.

P.S.
The text displayed in the window during the optimization is truncated



P.P.S. :D
I use the last version of the optimizer with the normal Purebasic 3.94 IDE
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Re: Bug

Post by Deeem2031 »

Armoured wrote:Hi :)
I have problems with the instruction CreateFile() after I have optimized his return value is always 0.
The optimizer doesn't change something in CreateFile() or his call. But i've tested it nevertheless:

With optimizer: 1992
Without optimizer: 1992

And the optimizer says 0 lines removed/modified/added.
So CreateFile() cannot be the problem.
Armoured wrote:P.S.
The text displayed in the window during the optimization is truncated
Yes, i didn't have the time to fix that.


Btw. if someone want to try a linux version: http://www.deeem2031.de/PB/Linux/optimizer

But its very beta ;) No progressbar, no .log and it cannot read the ini yet.
irc://irc.freenode.org/#purebasic
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

important:
Set the option "Optimize_ReplaceEsi" in the D_Optimizer.ini, until the next version is released, to zero or its possible that the program doesn't work correctly.
irc://irc.freenode.org/#purebasic
Armoured
Enthusiast
Enthusiast
Posts: 365
Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:

Post by Armoured »

Hi Deeem2031. :)
You have found the bug of my first post.
Thanks!


P.S.
You have make a very good work but please fix the display of the text ;D
Thanks again!
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

Hummm... have you changed anything since October 21, Deeem2031? Before I would always get an error when trying to compile but now (I just downloaded again) I don't get an error. Did you upload a new version without saying anything? And if you did... thanks :)
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

Yea, I uploaded Version 1.13 at the 9. November but posted that in the german forum only :oops:
But theres nothing new besides the bugfix.
irc://irc.freenode.org/#purebasic
tomijan
Enthusiast
Enthusiast
Posts: 107
Joined: Sun Dec 11, 2005 1:32 pm

Post by tomijan »

I try to compile programm "soundeditor" from www.freesoundeditor.com with d_optimizer, but it produce "symbol already defined" error (in generated asm source I found duplicate labels). Compiling without d_optimizer is succesfull.
Its a bug?
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

Fixed: Version 1.14

You can also set "Optimize_CMPNullString" to 0 if you dont want to download the new version.
irc://irc.freenode.org/#purebasic
Armoured
Enthusiast
Enthusiast
Posts: 365
Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:

Post by Armoured »

Thanks again Deeem2031 :wink:
Balatro
User
User
Posts: 15
Joined: Sun Oct 05, 2003 2:27 pm

Post by Balatro »

I can't get this to work with 4.00. Any tips?
Post Reply