Hi.

I need a fast function that compares three numbers and returns the biggest.
Do you know an ASM library that can do such a calculation?

I downloaded a library called 'Math387' which implements such a function 
but for two numbers, not for three.
The person who made the library pretends that it is made in ASM but 
actually, it has the same speed as Borland's Max function.

I need this function in a loop that is executed 100,000,000 times. By 
itself, it takes 2.1 seconds.






*Borland Max function:*

function Max(const A, B: Integer): Integer;
begin
  if A > B then
    Result := A
  else
    Result := B;
end;



*My function (for 3 numbers):*

function Find_Max(const v1,v2,v3: integer): Integer;
begin
 Result:= v1;
 if (v2 >  Result) then  Result:= v2;
 if (v3 >  Result) then  Result:= v3;
end;


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to