Page 1 of 2
Optimizer
Posted: Mon Oct 03, 2005 4:26 pm
by remi_meier
Optimizer v.1.5
So if there is a "just another Optimizer" there has to be an "Optimizer"
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
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
Have fun!
greetz
Remi
Re: Optimizer
Posted: Mon Oct 03, 2005 5:26 pm
by va!n
Posted: Mon Oct 03, 2005 9:00 pm
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?
Posted: Mon Oct 03, 2005 9:21 pm
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!

Posted: Mon Oct 03, 2005 9:24 pm
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...
Posted: Mon Oct 03, 2005 9:33 pm
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!
Posted: Mon Oct 03, 2005 11:25 pm
by DoubleDutch
On my project I got some quite big reductions in code size. Nice

Posted: Mon Oct 03, 2005 11:53 pm
by va!n
@DoubleDutch:

afaik, the optimizer even removes unused procedures and then you may get quite some bigger size reductions

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)
Posted: Tue Oct 04, 2005 1:19 am
by Xombie
These speed optimization utilities are some of the best things I've played with since starting on PB. This is awesome

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

So great.
A big thanks to Deeem2031, remi_meier and va!n

Posted: Tue Oct 04, 2005 5:03 am
by okasvi
does it work with compiler directives? (CompilerIf, CompilerEndIf, etc.)
Posted: Tue Oct 04, 2005 5:21 am
by va!n
@okasvi:
afaik it should make no problems!
Posted: Tue Oct 04, 2005 8:47 am
by dobro
thank you!!
Microsoft will have sold very expensive this prg!

Posted: Tue Oct 04, 2005 11:19 am
by remi_meier
Thanks va!n for the nice support! All your 'AFAIK's were right
And thanks for the nice comments! It seems that there are no bugs so far?
greetz
Remi
Posted: Wed Oct 05, 2005 12:34 am
by va!n
@remi_meier:
no problem!

Posted: Wed Oct 05, 2005 3:09 am
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
