flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
maslan 08 Jul 2004, 11:13
hi guys
if i've 2 pieces of diff. code which do the same perpose how can i test the performance of each to know which one works faster and so on like that : the 1st i wrote Code: SYS_PRINT: ; ESI:STRING OFFSET MOV EBX, 00000001h MOV ECX, ESI PRINT_LOOP: MOV AL, [ECX] OR AL, AL JZ PRINT_END MOV EAX, 00000004h MOV EDX, 00000001h INT 80h INC ECX JMP PRINT_LOOP PRINT_END: MOV ESI, ECX RET and the other one taken from fasm source Code: SYS_PRINT: ; ESI:STRING OFFSET MOV EDI,ESI MOV EDX,ESI OR ECX,-1 XOR AL,AL REPNE SCASB NEG ECX SUB ECX,2 MOV EAX,4 MOV EBX,1 XCHG ECX,EDX INT 80h RET when i compiled them the 1st is 38 bytes and the 2nd is 39 bytes so i want to test the performance and the speed for this example ![]() thanks _________________ Maslan I'm searching for perfection so, even if u need portability u 've to use Assembly --- http://www.maslanlab.org --- http://libosdk.berlios.de http://maslanedit.sf.net http://maslancms.sf.net |
|||
![]() |
|
maslan 08 Jul 2004, 12:05
![]() ya sure i use linux & also freebsd and minix i heard about time command may be when building linux from scratch but i've 2 computers , so i think i will test it on both machines for more accurate results (p3 450M,p4 2.6G) thanks for ur quick reply ![]() _________________ Maslan I'm searching for perfection so, even if u need portability u 've to use Assembly --- http://www.maslanlab.org --- http://libosdk.berlios.de http://maslanedit.sf.net http://maslancms.sf.net |
|||
![]() |
|
pelaillo 08 Jul 2004, 12:43
Hi Maslan,
Have you tested the methods shown on the following thread? http://board.flatassembler.net/topic.php?t=496 |
|||
![]() |
|
fasm9 09 Jul 2004, 00:40
OProfile - A System Profiler for Linux
http://oprofile.sf.net BTW, whatever you want in Linux, it is in Kernel! so need kernel-compile. debian:/usr/src/linux-2.6.7#make menuconfig enable Oprofiler, if you want kernel hacking with FASM, also, enable Kernel hacking option. http://kerneltrap.org -- bk20+ck4(staircase 7.9)+fusion-full-linux 2.6.3 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.