flat assembler
Message board for the users of flat assembler.

Index > Main > Can Fasm compile faster?

Author
Thread Post new topic Reply to topic
rocketsoft



Joined: 26 Jan 2010
Posts: 189
rocketsoft 07 Feb 2011, 15:33
System:I7-870@3.94Ghz

Self compile of rasm:44 millisecond (7 passes, 124000 bytes, mostly code)
Self compile of fasmw:94 millisecond (6 passes, 138000 bytes, mostly code)
note: i increased the resolution of fasmw´s timer to 1 millisecond

As u can see RASM compiles OVER twice as fast as FASM
It only matters offcourse when compiling VERY BIG sources

Rasm has no preprocessor... that could explain the difference
Fasm uses binary trees... and Rasm uses a faster database system

I have no need yet for preprocessing in any of my applications
u only loose EQU, which does literal substitution
Post 07 Feb 2011, 15:33
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20418
Location: In your JS exploiting you and your system
revolution 07 Feb 2011, 15:40
Are you trying to start a speed war?

Without a preprocessor then that means you have no macros? If so then ewww, so many tedious things to code with no macros to do the drudge work for you.
Post 07 Feb 2011, 15:40
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 07 Feb 2011, 15:55
Can fasm compile faster? Most certainly - however the improvements would be mostly not worth the time spent on developing them. And another bad news - fasm 2 (if/when I finally write it) is most probably going to be slower than 1.x.

As for the comparison - though the method of comparing the time in which assemblers compile itself was sometimes used by Betov, it is really the "apples vs oranges". If you want to do get any valuable results, you should compile some identical (up to the syntax differences) source with both tools. Randall Hyde once did such a benchmarking, and you can find the test generator here, but I have another nice source for testing. It is something that was a real project once posted on Win32Asm community board - I attach the source of C program which in turn generates the assembly source.
BTW, the test shows that fasm 1.69.31 is noticeably slower than 1.68. So the trend towards the slow 2.0 is already visible. Wink Very Happy


Description: Test source generator.
Download
Filename: GenAsm2.c
Filesize: 19.96 KB
Downloaded: 543 Time(s)

Post 07 Feb 2011, 15:55
View user's profile Send private message Visit poster's website Reply with quote
YONG



Joined: 16 Mar 2005
Posts: 7997
Location: 22° 15' N | 114° 10' E
YONG 08 Feb 2011, 09:13
Tomasz Grysztar wrote:
And another bad news - fasm 2 (if/when I finally write it) ...
Oh no! Sad I thought that fasm 2 would be available by 2020. But now ... I believe that fasm 2 will never be available! Sad Crying or Very sad Crying or Very sad Crying or Very sad Confused
Post 08 Feb 2011, 09:13
View user's profile Send private message Visit poster's website Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 08 Feb 2011, 10:00
2 -> 1.69.xx, y-not :p
div_64(used by fasm) can be replaced with amd's variant, where 2 divs used as maximum
i can explain it in a bit different way if you do not understand the algo
Post 08 Feb 2011, 10:00
View user's profile Send private message Reply with quote
rocketsoft



Joined: 26 Jan 2010
Posts: 189
rocketsoft 08 Feb 2011, 15:15
Offcourse RASM has macros (Its very Tasm compatible)
preprossesing is only needed INSIDE macros
Normal code does not need preprossesing
Post 08 Feb 2011, 15:15
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 08 Feb 2011, 16:25
Quote:
Normal code does not need preprossesing
in this case why not give the choice ? (with a directive)
By default the preprocessing is "on",
but if you don't use macros,
the directive "preprocessing_off" to disable preprocessing.
Code:
format PE large GUI 4.0
entry start
preprocessing_off
start:
    

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 08 Feb 2011, 16:25
View user's profile Send private message Send e-mail Reply with quote
SFeLi



Joined: 03 Nov 2004
Posts: 138
SFeLi 08 Feb 2011, 17:09
ouadji, for what? Even fasm itself compiles in less than a second.
Post 08 Feb 2011, 17:09
View user's profile Send private message Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 08 Feb 2011, 17:45

yes, i'm agree.
fasm suits me perfectly as it is.

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 08 Feb 2011, 17:45
View user's profile Send private message Send e-mail Reply with quote
MinhHung



Joined: 10 Sep 2010
Posts: 51
Location: Viet Nam
MinhHung 08 Feb 2011, 21:22
can UPX make fasm faster. http:\\upx.sf.net
Post 08 Feb 2011, 21:22
View user's profile Send private message Yahoo Messenger Reply with quote
Ivan2k2



Joined: 08 Sep 2004
Posts: 80
Location: Russia, Angarsk
Ivan2k2 09 Feb 2011, 10:51
MinhHung wrote:
can UPX make fasm faster. http:\\upx.sf.net


UPX will not make executables faster
Post 09 Feb 2011, 10:51
View user's profile Send private message ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20418
Location: In your JS exploiting you and your system
revolution 09 Feb 2011, 10:53
But maybe fasm can make UPX faster.
Post 09 Feb 2011, 10:53
View user's profile Send private message Visit poster's website Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 09 Feb 2011, 12:45
MinhHung wrote:
can UPX make fasm faster. http:\\upx.sf.net

It will not make the internals of fasm go faster. On the other hand, it will slow down (just a little a bit) the execution of the fasm executable since it now has to uncompress itself before execution.


revolution wrote:
But maybe fasm can make UPX faster.

Smile
Post 09 Feb 2011, 12:45
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20418
Location: In your JS exploiting you and your system
revolution 09 Feb 2011, 12:53
ManOfSteel wrote:
It will not make the internals of fasm go faster. On the other hand, it will slow down (just a little a bit) the execution of the fasm executable since it now has to uncompress itself before execution.
Well that is part of the debate I guess. Can UPX uncompress faster than the OS can load the extra bytes from the HDD? For first time runs the answer might be yes. For subsequent runs coming from cache the answer might be no. For smallish programs like fasm it probably makes absolutely no perceivable difference to the user at the keyboard.
Post 09 Feb 2011, 12:53
View user's profile Send private message Visit poster's website Reply with quote
MinhHung



Joined: 10 Sep 2010
Posts: 51
Location: Viet Nam
MinhHung 09 Feb 2011, 13:13
hehe. Sorry. I think best compiler not only fast , best compiler easy to understand->code easy. Now, computer processor very fast. I think 'code easy' bester than 'fast compiler'
Post 09 Feb 2011, 13:13
View user's profile Send private message Yahoo Messenger Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 13 Feb 2011, 20:06
revolution wrote:
ManOfSteel wrote:
It will not make the internals of fasm go faster. On the other hand, it will slow down (just a little a bit) the execution of the fasm executable since it now has to uncompress itself before execution.
Well that is part of the debate I guess. Can UPX uncompress faster than the OS can load the extra bytes from the HDD? For first time runs the answer might be yes. For subsequent runs coming from cache the answer might be no.
Especially since the from-disk-bytes will then be served from cache, but you'll still be doing the decompression overhead - and on top of that, multiple instances of the same program won't benefit from copy-on-write page sharing.

_________________
Image - carpe noctem
Post 13 Feb 2011, 20:06
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4352
Location: Now
edfed 13 Feb 2011, 21:21
a computer, even used for an intensive threading, have a lot of time without doing anything.
fasm does really something, it lets you speak directlly to the computer and take control of the machine. then no matter if it is slow (and it is not), it does something that no other assembler does, it lets you code assembler easy, and uses a very good syntax, and a powerfull macro processor, then, it can be a little slower than other assemblers (and it is not), because it does something that it is the only one to do.

maybe fasm2 will not be so good, just wait to see what IDE it will have. bloat like a lot of IDE or clean as fasmw1.xx?
Post 13 Feb 2011, 21:21
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 13 Feb 2011, 23:33
edfed wrote:
maybe fasm2 will not be so good, just wait to see what IDE it will have. bloat like a lot of IDE or clean as fasmw1.xx?
Any reason the current IDE has to change much just because the assembler backend becomes more powerful?
Post 13 Feb 2011, 23:33
View user's profile Send private message Visit poster's website Reply with quote
Teehee



Joined: 05 Aug 2009
Posts: 570
Location: Brazil
Teehee 17 Feb 2011, 14:58
Image
Post 17 Feb 2011, 14:58
View user's profile Send private message Reply with quote
mattst88



Joined: 12 May 2006
Posts: 260
Location: South Carolina
mattst88 23 Feb 2011, 06:28
f0dder wrote:
edfed wrote:
maybe fasm2 will not be so good, just wait to see what IDE it will have. bloat like a lot of IDE or clean as fasmw1.xx?
Any reason the current IDE has to change much just because the assembler backend becomes more powerful?

It's the same logic that causes him to use Windows 98. Smile

_________________
My x86 Instruction Reference -- includes SSE, SSE2, SSE3, SSSE3, SSE4 instructions.
Assembly Programmer's Journal
Post 23 Feb 2011, 06:28
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.