Page 1 of 1

Source x64 assembly required for benchmarking NASM

Posted: Sat Jul 24, 2010 7:23 am
by madanra
I'm wanting to benchmark (different compiles of) NASM, assembling x64 assembly, for which I need reasonable amounts of assembly code, which I don't have (yet...). I searched the wiki's project list, and the only x64 source I managed to access was BareMetal OS's, which assembles in under a second, which is no good for benchmarking.
Does anyone have/could point me to some code I could use? It doesn't even have to do anything :P just take at least 10 seconds to assemble, and contain a reasonable variety of instructions (hence copy+paste not great)...

Re: Source x64 assembly required for benchmarking NASM

Posted: Sat Jul 24, 2010 10:38 am
by NickJohnson
Why do you need to benchmark NASM when clearly there is so little 64 bit x86 assembly out there that you can't find enough of it to test with, and therefore will likely never have enough of it for the speed of NASM to matter?

Re: Source x64 assembly required for benchmarking NASM

Posted: Sat Jul 24, 2010 10:51 am
by madanra
Just interest really. I've now written a program that generates random assembly code to do the benchmarks with, and to get long enough assembly times I needed to get it to generate a million lines of code - so you are quite right, speed is never going to be an issue!

Re: Source x64 assembly required for benchmarking NASM

Posted: Wed Jul 28, 2010 1:51 am
by Ferrarius
Seems to be a rather pointless excercise to me, but uh.
So does writing an OS to most people. Was there a specific point you wanted to make?

Unfortunately I don't write x64 assembly so I can't help you.

Re: Source x64 assembly required for benchmarking NASM

Posted: Wed Jul 28, 2010 2:17 pm
by Code0x58
You could possibly get a 64-bit application and disassemble it with ndisasm then reassemble it and see how long it takes, you could do it with quite large applications but it won't have to deal with macros so will probably be faster compiling than if it were to have macros and things in it but I think benchmarking NASM assemble times seems like a bit of a hard task really.

Re: Source x64 assembly required for benchmarking NASM

Posted: Wed Jul 28, 2010 2:27 pm
by Ferrarius
It's also possible to generate a few source files with a perl script or something like that. I take it it's not necessary to assemble a program that has to run?

Re: Source x64 assembly required for benchmarking NASM

Posted: Wed Jul 28, 2010 2:32 pm
by madanra
No - it just has to be lots of (valid) assembly. (Hence I did write a program that generated assembly code, and benchmarked against that)