You are here: Home > Fastcode project > Ceil64 Challenge
Ceil64 Challenge
The objective is to build the fastest extension for RTL Ceil
Call
Ceil64 to obtain the lowest Int64 greater than or equal to X. For
example:
Ceil64(-2.8) = -2
Ceil64(2.8) =
3
Ceil64(-1.0) = -1
There are three overloaded
functions differing in the input datatype.
function
Ceil64(const X: Extended): Int64; overload;
function Ceil64(const X:
Double): Int64; overload;
function Ceil64(const X: Single): Int64;
overload;
Note: The absolute value of X must be less than
MaxInt64 = $7FFFFFFFFFFFFFFF;
Validation and Benchmark Tool
Tables of results
Extended
Target | Function | Author |
P4 Northwood | CeilExtendedRTL | Borland |
P4 Prescott | CeilExtendedDKCSSE3 | Dennis Christensen |
Pentium M | CeilExtendedJOH | John O'Harrow |
P3 | CeilExtendedJOH | John O'Harrow |
Athlon XP | CeilExtendedJOH | John O'Harrow |
Opteron | CeilExtendedJOH | John O'Harrow |
RTL Suggestion | CeilExtendedJOH | John O'Harrow |
Pascal | CeilExtendedRTL | Borland |
Blended | CeilExtendedJOH | John O'Harrow |
Double
Target | Function | Author |
P4 Northwood | CeilDoubleJOH2 | John O'Harrow |
P4 Prescott | CeilDoubleJOH2 | John O'Harrow |
Pentium M | CeilDoubleJOH | John O'Harrow |
P3 | CeilDoubleJOH2 | John O'Harrow |
Athlon XP | CeilDoubleJOH | John O'Harrow |
Opteron | CeilDoubleJOH | John O'Harrow |
RTL Suggestion | CeilDoubleJOH | John O'Harrow |
Pascal | CeilDoubleDKCPas4 | Dennis Christensen |
Blended | CeilDoubleJOH | John O'Harrow |
Single
Target | Function | Author |
P4 Northwood | CeilSingleJOH | Dennis Christensen |
P4 Prescott | CeilSingleDKCSSE3 | Dennis Christensen |
Pentium M | CeilSingleJOH | John O'Harrow |
P3 | CeilSingleJOH | John O'Harrow |
Athlon XP | CeilSingleDKC2 | Dennis Christensen |
Opteron | CeilSingleDKC2 | Dennis Christensen |
RTL Suggestion | CeilSingleJOH | John O'Harrow |
Pascal | CeilSingleDKCPas4 | Dennis Christensen |
Blended | CeilSingleJOH | John O'Harrow |