flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > What is faster and what is less greedy to memory resources |
Author |
|
revolution 04 Mar 2023, 21:10
There is no definitive answer because it depends upon your systems, the input sources, and the fasm version.
In general macros are slow, but run only once. Whereas assembly passes are fast but run many times. Not always true, but a good rule of thumb IMO. So if you have a lot of passes then option one might be slower. If you have few passes then option two might be slower. As with all optimisations, you will have to test it on each of your systems to know how it will turn out for you. And someone else might see different results even for the same inputs. |
|||
04 Mar 2023, 21:10 |
|
ProMiNick 04 Mar 2023, 21:38
test on 34192 lines of
Code: via_sp add eax,(1+2)*no@frame+6*(1-no@frame) Code: no@frame=0 1st one algo - 1 pases, 0.1..0.2 seconds randomly 2nd one algo - 1 passes, 0.0..0.1 seconds randomly (no sumary info about sec I suppose as 0.0 sec) so. as sayed above 2nd algo should be faster on multypass, but even on single pass it 2 times faster. So 2nd one is preferrable or it have some hidden limitation that 1st one havn`t? |
|||
04 Mar 2023, 21:38 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.