Re: Hex to ascii



Jean-François Michaud wrote:
Terje Mathisen wrote:
In 32-bit mode the difference is even larger, the code AMD "borrowed"
converts a full 32-bit unsigned integer to 10 decimal digits in less
time than the cpu needs for a single DIV opcode! :-)

Terje

How about a lookup table?

Lookup tables are indeed good here, in fact they should be the obvious choice. :-)

However, when working with more digits and/or parallel operations, straight inline SIMD code tends to beat lookup tables due to the load stage bottleneck.

Terje

--
- <Terje.Mathisen@xxxxxxxxxxxxx>
"almost all programming can be viewed as an exercise in caching"

.



Relevant Pages

  • Re: Hex to ascii
    ... converts a full 32-bit unsigned integer to 10 decimal digits in less ... time than the cpu needs for a single DIV opcode! ... Lookup tables are indeed good here, in fact they should be the obvious ... straight inline SIMD code tends to beat lookup tables due to the load ...
    (comp.lang.asm.x86)
  • Re: vlookup problem, possibly due to "noise"
    ... have in your lookup table that, after displaying 20+ decimal digits, ... rounding functions: you thought you had 2.01 and in reality it was ... not are the numbers in the key column of the lookup table ordered ...
    (microsoft.public.excel.worksheet.functions)