Hi s4uri3r,
Nasm is not especially "fast", but 10 seconds for 4000 lines of code seems excessive. One of my recent projects runs about 2000 lines of code, and assembles in about 0.2 seconds (on a P4, 1.8GHz - a "not-so-good" computer) - but it doesn't "%include" any files, and uses few macros, either of which could slow Nasm down.
One obvious solution is to break your project down into multiple files, and use a makefile so that only the changed files are assembled each time - but you shouldn't "have" to do that. In some cases, it may help to do one "preprocess only" pass (nasm -f
-e myfile.asm>myfile.pre), and then an "assemble only" pass (nasm -f
-a -Ox myfile.pre). When Nasm does multiple passes, it starts with "preprocess" each time, normally, so avoiding that can help - if you're using the "-O" switch, and your file requires an unusually large number of passes to resolve jump displacements. Not a great solution, at best, and may not help at all...
There's the "have a cup of coffee" solution...
Ten seconds seems like "too much". Can you give us more information about exactly what you're doing? (Nasm version, command line, included files, etc.) Sorry I don't have a better answer.
Best,
Frank