Improve optimized ASM output !!!

Got an idea for enhancing PureBasic? New command(s) you'd like to see?

Want see better fast/optimized ASM output !?

Yes, its time to improve it...
25
86%
No, its not needed...
4
14%
 
Total votes: 29

va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Improve optimized ASM output !!!

Post by va!n »

As long as i know PureBasic, people discused again and again about some speed/optimizing improvements! I visited the very active german forum (great guys there!) and noticed that a lot people are discussing about speed and more optimisations!!!

On the german forum is one very talented guy named "remi_meier" from switzerland and he showed a lot of speed optimisations and at least he coded a small fantastic tool called "optimizer"! This great tool will check the PureBasic generated ASM output and try to replace some ASM parts by a lot faster and optimized routines!! There are some very strange speed compasion results between the original PB output and converted by the tool optimizer! (in some cases the OPTIMIZED output as double fast as the original output - still impressive and my biggest respect!!!

I see remi_meier as a very talented coder; even he know a lot about ASM speed optimisations! So i would like to see remi_meier as a member of the official pure_team to help fred and at least to help us... for having a really intelligent and gooood compiler that produces very optimized and fast executeables!!! (i dont need a fast compiler... i still need fast executeables ;-)

Fred, would be nice if you can get in contact with remi_meier and maybe other very talented coders on the pure comunity to improve purebasic!

Here are some interested links/stuff for optimizing...

http://www.azillionmonkeys.com/qed/amultl1.html
http://www.wasm.ru/tools/22/magicnumber.zip
http://www.xyzw.de/c190.html <<< high optimized math routines
http://mypage.bluewin.ch/remimeier/zip/Optimierer.zip << for PureBasic
http://www.iseran.com/Win32/CodeForSpeed/
http://www.deinmeister.de/asmopt.htm#b

----------------------------------------------------------------

Please vote... do you want a better compiler producing fast optimized asm output? (fred, this should be no critic and i dont want blame you!!! ;-)
Last edited by va!n on Mon Aug 08, 2005 11:37 pm, edited 4 times in total.
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Post by remi_meier »

First: :oops:

> he showed a lot of speed optimisations and at least he coded a small
> fantastic tool called "optimizer"!
A lot of the optimization ideas don't come from me, the forum members
helped a lot! (just look into the Credits.txt)

> So i would like to see remi_meier as a member of the official pure_team
> to help fred and at least to help us...
Fred knows enough about optimizing, he just should implement it!

I voted yes (cause I have a lot of time consuming algorithms working here),
but I would also like to see PB 4.0 before :wink:

But nice to hear, that my tool works for you!

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 wrote:First: :oops: Remi
:wink:
remi_meier wrote: A lot of the optimization ideas don't come from me, the forum members
helped a lot! (just look into the Credits.txt)
yes i know. but you have started the big project with the great help of some very talented guys from the comunity!
va!n wrote: ...with remi_meier and maybe other very talented coders on the pure comunity... :wink:
va!n wrote: Fred knows enough about optimizing, he just should implement it!
Yes i agree about the implentation but it would be cool if some very talented people may help fred. ok, i know about much postings that some people contacted fred and only getting an answer "nice stuff. maybe i will implent it" but nothing happens... (sorry fred, i dont want blame you but this is what you can often read in many german/english postings by the comunity :roll:)

so i dont want blame someone and hope fred and his team will keep on their great work (maybe with a better optimized compiler) :wink:
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

I've already took a look some month ago to the remi tools and it's a great one, you can use it, no problem. For now we concentrate on the next PureBasic version which an higher priority than all specific optimisations we could add (to have a code a bit faster in real life program).
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

Hmm! A pre-processor and a (post) optimizer could be seperate,
even 3rd party or open source projects.

Infact, no changes to the compiler is needed.
Just add two configuration options to the IDE.

That way users could spesify a pre-processor,
and a post-processor.

Example: (if user is using both pre and post processing)

1. User hit compile!
2. IDE runs the source thru the pre-processor
3. IDE runs the pre-processed code thru the compiler, which outputs the assembled code.
4. IDE runs the asm code thru the post-processor
5. IDE runs the post-process code thru the compiler again for final execution compiling.

This would allow those with existing tools to use those,
those that do not wish pre or post procerssing to turn it off,
and later official tools (if any) can easily be added.
(by a checmark "Use Default" in the IDE maybe?)

This would also avoid the issue with replacing/renaming the fasm.exe right?

Or am I talking total gibberish here? :)

Hmm! Did I just describe how a 3 pass compiler worked just now? *laughs*
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Rescator wrote:Just add two configuration options to the IDE.
That is a really good idea!
@}--`--,-- A rose by any other name ..
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Improve optimized ASM output !!!

Post by fsw »

va!n wrote:On the german forum is one very talented guy named "remi_meier" from switzerland and he showed a lot of speed optimisations and at least he coded a small fantastic tool called "optimizer"! This great tool will check the PureBasic generated ASM output and try to replace some ASM parts by a lot faster and optimized routines!!
A so called "peephole" optimizer?

Have to look at the german forum...
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> Infact, no changes to the compiler is needed.
> Just add two configuration options to the IDE.
> That way users could spesify a pre-processor,
> and a post-processor.

I've wanted PureBasic to have something like this for a long time. :)
Basically, it would be great if the compiler could ShellExecute something
before and after compilation. So, for example, pressing F5 to compile
would do something like this:

(1) User selects "Create executable" or presses F5 to compile/run.
(2) Compiler ShellExecutes Option 1, which is a command line in Options.
(3) Compiler then compiles as normal.
(4) After compilation, Compiler ShellExecutes Option 2, which also is a commandline.

If Option 1 or 2 aren't defined, then they are ignored. One immediate
example of this use is for Option 2 to be something like "upx.exe app.exe"
to automatically compress an exe after creation. Option 1 could be any
pre-processor to work on the source before compilation starts. If PureBasic
had these options, it'd be fantastic -- and extremely easy for it to be added! :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

PB: look at the Beta 5 doc about triggers and external tools ;)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> PB: look at the Beta 5 doc about triggers and external tools ;)

Ohhhhhhhhhhh... man, this is FANTASTIC! :D

You've just made my day with the editor now... everything that I mentioned
that I missed from jaPBe is now here... markers being saved in the source,
jumping back to the previous line after double-clicking a procedure name,
the status bar highlighting the current procedure parameter, the bug of the
cursor slowing down when up/down arrowing past "Procedure"... it's all good!

Image
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Glad to hear that :D
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

This is really potent! Many thanks!

Edit: BTW, that part of the ref manual is looking pretty good as well! Easy to read and full of info. Thanks again.
@}--`--,-- A rose by any other name ..
Post Reply