News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Masm64 SDK ignores "uses"

Started by jj2007, August 28, 2023, 08:36:11 AM

Previous topic - Next topic

jj2007

Quote from: HSE on August 29, 2023, 11:08:32 PMThere is no call in this test.

Interesting. "nc" stands for "no call":
Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
*
pushing took 983 ms
moving  took 1139 ms
nc pushing took 1030 ms
nc moving  took 936 ms
pushing took 1045 ms
moving  took 1139 ms
nc pushing took 1014 ms
nc moving  took 952 ms
pushing took 998 ms
moving  took 1201 ms
nc pushing took 1014 ms
nc moving  took 936 ms
pushing took 967 ms
moving  took 1263 ms
nc pushing took 1030 ms
nc moving  took 951 ms

IMHO there should be a call, since we are talking about the best way to implement "uses rsi rdi". Anyway, it's an interesting result :cool:

HSE

Quote from: jj2007 on August 29, 2023, 11:27:19 PMIMHO there should be a call, since we are talking about the best way to implement "uses rsi rdi".

Correct. There was to much variations in your test. I tried to split the problem to see where variation is. Look like access to stack have that variation.
Equations in Assembly: SmplMath

zedd151

Quote from: zedd151 on August 29, 2023, 07:22:29 AMIntel(R) Core(TM)2 Duo CPU    E8400  @ 3.00GHz
pushing took 1716 ms
moving  took 2091 ms
pushing took 1794 ms
moving  took 2090 ms
pushing took 1779 ms
moving  took 2090 ms
pushing took 1763 ms
moving  took 1934 ms

Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
pushing took 969 ms
moving  took 985 ms
pushing took 953 ms
moving  took 1000 ms
pushing took 968 ms
moving  took 985 ms
pushing took 969 ms
moving  took 984 ms
I like beating my old, slow machine.  :azn:

zedd151

Quote from: jj2007 on August 29, 2023, 11:27:19 PMIntel(R) Core(TM) i5-2450M CPU @ 2.50GHz
*
pushing took 983 ms
moving  took 1139 ms
nc pushing took 1030 ms
nc moving  took 936 ms
pushing took 1045 ms
moving  took 1139 ms
nc pushing took 1014 ms
nc moving  took 952 ms
pushing took 998 ms
moving  took 1201 ms
nc pushing took 1014 ms
nc moving  took 936 ms
pushing took 967 ms
moving  took 1263 ms
nc pushing took 1030 ms
nc moving  took 951 ms

IMHO there should be a call, since we are talking about the best way to implement "uses rsi rdi". Anyway, it's an interesting result :cool:

Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
*
pushing took 594 ms
moving  took 610 ms
nc pushing took 593 ms
nc moving  took 610 ms
pushing took 593 ms
moving  took 625 ms
nc pushing took 594 ms
nc moving  took 578 ms
pushing took 610 ms
moving  took 609 ms
nc pushing took 594 ms
nc moving  took 594 ms
pushing took 609 ms
moving  took 609 ms
nc pushing took 610 ms
nc moving  took 593 ms
:biggrin:  I'm kinda bored atm.

jj2007

With an AMD:
AMD Athlon Gold 3150U with Radeon Graphics
*
pushing took 1109 ms
moving  took 1110 ms
nc pushing took 1140 ms
nc moving  took 1110 ms
pushing took 1125 ms
moving  took 1125 ms
nc pushing took 1140 ms
nc moving  took 1125 ms
pushing took 1125 ms
moving  took 1125 ms
nc pushing took 1140 ms
nc moving  took 1125 ms
pushing took 1125 ms
moving  took 1141 ms
nc pushing took 1140 ms
nc moving  took 1141 ms

In short: no difference, and the justification of this horrible ABI that "moving is faster than pushing" is bulls*it.