Optimizer

Developed or developing a new product in PureBasic? Tell the world about it.
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Optimizer

Post by remi_meier »

Optimizer v.1.5

So if there is a "just another Optimizer" there has to be an "Optimizer" :lol:

I didn't announce it yet in the English forums cause there was no real reason
to do so... But now Deeem2031 gave me one :P

http://mypage.bluewin.ch/remimeier/zip/Optimierer.zip

I'm not a man of great words, but I translated the German description on
PureArea.net to English, so this has to be enough.
http://www.purearea.net/pb/showcase/show.php?id=156&d=1

The most important features:
- Speed optimizations in asm code
- Calculating with double-floats faster than with procedures
- Macros!
- Inlining of some PB procedures

Best used with Deeem's one :wink:
Have fun!

greetz
Remi
Athlon64 3700+, 1024MB Ram, Radeon X1600
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Re: Optimizer

Post by va!n »

@remi_meier:
viewtopic.php?t=16229&highlight=optimizer

nice work! keep it on! :wink:
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

I installed the optimizer as directed and when I compile I get a window asking if I want to optimize. I check yes and the resulting exe is exactly the same number of bytes in size as if I don't optimize. Does that sound right to you or does it seem like maybe I don't have it installed correctly?
BERESHEIT
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@netmaestro:
i had the same problem... on small projects the optimized filesize was smaller to the original.... but be sure, if you use the optimizer and even when you cant see any size different - the optimized version runs a lot faster!!! Optimizing a program in speed must not reduce the filesize at all! (sometimes speed optimisations can procude larger files ;) - Just do a speed check to your project and you may see that remi_meier´s optimizer did some great work! :wink:
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

I don't mind roughly same size or even a bit larger, but 459,504 unoptimized and 459,504 optimized makes me suspicious that nothing got done...
BERESHEIT
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

please note that every win32 file using 512 byte alignment! so you cant see it every time when there is a different (optimized part) in the code! If you dont believe me, just add somewhere in your source something like:

lSimpleSizeTest.l = 96 ; or something like this...

If you have some space in the last 512 byte file alignment, the filesize will not changed! Anyway 512 bytes will be added to your compiled file!

Btw, you can do a speed test or just simple use a HexEditor and compare the original and optimized versions!
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

On my project I got some quite big reductions in code size. Nice :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@DoubleDutch:
:D afaik, the optimizer even removes unused procedures and then you may get quite some bigger size reductions :wink: Anyway remi_meier and Deeem2031 did great work with their both tools! (just try out jaPBo in combination with remi_meier´s tool - but there are still some small bugs)
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

These speed optimization utilities are some of the best things I've played with since starting on PB. This is awesome :D It cuts 4k off of my little xGrid project. Which may not sound like a lot but it was only 91k in the first place ~_~ Haven't checked the speed increase but... man :D So great.

A big thanks to Deeem2031, remi_meier and va!n :)
okasvi
Enthusiast
Enthusiast
Posts: 150
Joined: Wed Apr 27, 2005 9:41 pm
Location: Finland

Post by okasvi »

does it work with compiler directives? (CompilerIf, CompilerEndIf, etc.)
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@okasvi:
afaik it should make no problems!
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

Post by dobro »

thank you!!

Microsoft will have sold very expensive this prg! :D
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Post by remi_meier »

Thanks va!n for the nice support! All your 'AFAIK's were right :wink:

And thanks for the nice comments! It seems that there are no bugs so far?

greetz
Remi
Athlon64 3700+, 1024MB Ram, Radeon X1600
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@remi_meier:
no problem! :wink:
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

I don't want to sound ungrateful (I'm not - this is awesome) but would there be a chance to see an expanded set of double functions? Like a string->double, some rounding functions, etc...? If not, I shall wait patiently for pb 4 :D
Post Reply