flat assembler
Message board for the users of flat assembler.

Index > Main > Comparison of assemblers

Goto page Previous  1, 2, 3, 4, 5
Author
Thread Post new topic Reply to topic
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Yeah, NASM has had significant improvements (including bugfixes, x86_64, as well as speedups!!! ... at least without using -Ox). It's a good choice again. Granted, I ain't giving up on FASM, but ... I can use both! Wink

P.S. I almost wish FASM had a LEA optimizer like LZASM or A86. Fairly useless but does save some bytes when a simple "MOV ..." would suffice (and yes, it can be done with macros, meh). I can't imagine most people need the longer encoding (but who knows).
Post 13 Feb 2008, 05:12
View user's profile Send private message Visit poster's website Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Japheth
rugxulo wrote:
Yeah, NASM has had significant improvements (including bugfixes, x86_64, as well as speedups!!! ... at least without using -Ox). It's a good choice again. Granted, I ain't giving up on FASM, but ... I can use both! Wink


NASM still is very slow if compared to FASM, MASM or WASM. I have several cases where some hundreds of small - generated - ASM modules are to be assembled, and NASM is "desperately" slow for such tasks.
Post 13 Feb 2008, 07:52
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
You're sure you're using the latest NASM without any -O at all? Well, all I can say is, keep it on a RAM drive (and first in your search path) and recompile according to your processor (e.g. -march=athlon64 or /ox /6 or whatever /O2 etc. MSVC uses).

WASM is reputedly horribly slow at assembling Causeway. And yes, obviously FASM is quite fast (and could be much faster, even). Wink

EDIT: Don't forget that it checks %NASMENV% and will gladly use -Ox for as long as it likes.
Post 13 Feb 2008, 08:23
View user's profile Send private message Visit poster's website Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Japheth
rugxulo wrote:
You're sure you're using the latest NASM without any -O at all?


Yes, but I made a mistake. I used the DOS version of NASM, and the test was done in XP. When I use the Win32 version of NASM, it's significantly faster. The NASM-DOS was about 400% slower than MASM, NASM-W32 is just 50% slower.
Post 13 Feb 2008, 13:51
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
But the real question is: which is faster in pure DOS running under HX with JEMMEX? Wink

EDIT: Different processors make a huge difference. HA (archiver) DOS version is slower (!) than the Windows one on Vista, and the C-- rewrite (much faster on a 486 w/ MSDOS) is almost exactly the same speed as the NT compile on Vista (AMD64x2). Go figure.

Anyways, if you post some of your generated NASM examples, maybe we can test assembling them on different processors.

Make sure you disable any real-time protection etc. and unpack ("upx -d") before testing for sure. You may even wish to open a fresh command window first. (In DOS, you should probably reset or temporarily disable the cache, obviously.)

EDIT#2: I think the Win32 comes unpacked by default but the DOS one is UPX'd. So, that does make a difference (especially when they use either --brute or --ultra-brute, which usually utilizes LZMA).
Post 14 Feb 2008, 18:29
View user's profile Send private message Visit poster's website Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Japheth
rugxulo wrote:
EDIT#2: I think the Win32 comes unpacked by default but the DOS one is UPX'd. So, that does make a difference (especially when they use either --brute or --ultra-brute, which usually utilizes LZMA).


Yes, it's mainly the unpacking which takes time. If I use the unpacked DOS version, there is no difference in speed compared to the Win32 version.
Post 14 Feb 2008, 20:18
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
Rugxulo wrote:

Quote:
Yeah, NASM has had significant improvements (including bugfixes, x86_64


Oh well Sad

Quote:
wish FASM had a LEA optimizer like LZASM or A86. Fairly useless but does save some bytes when a simple "MOV ..." would suffice (and yes, it can be done with macros, meh). I can't imagine most people need the longer encoding


What do you want to optimize ? It's not the job of an asm compiler core to hack my/your code ... you code LEA so you get LEA ... you code MOV and you get MOV ... while "XOR EAX,EAX" or "PUSH 1 | POPE EAX" maybe "would suffice" Shocked

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 18 Feb 2008, 05:16
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
DOS386 wrote:
What do you want to optimize ? It's not the job of an asm compiler core to hack my/your code ... you code LEA so you get LEA ... you code MOV and you get MOV ... while "XOR EAX,EAX" or "PUSH 1 | POPE EAX" maybe "would suffice" Shocked


I know this has been discussed before, but I can't help feel: "Hey, if it's good enough for them ...". But whatever, nitpicking here, surely not even worth mentioning again (unless I do it myself, ugh).
Post 19 Feb 2008, 03:15
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:  
Goto page Previous  1, 2, 3, 4, 5

< 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.