25112 Rev. 3.06 September 2005

Software Optimization Guide for AMD64 Processors

Chapter 8

Integer Optimizations

 

The optimizations in this chapter help improve integer performance.

 

This chapter covers the following topics:

 

 

 

 

Topic

 

Page

 

 

Replacing Division with Multiplication

160

 

 

Alternative Code for Multiplying by a Constant

164

 

 

Repeated String Instructions

167

 

 

Using XOR to Clear Integer Registers

169

 

 

Efficient 64-Bit Integer Arithmetic in 32-Bit Mode

170

 

 

Efficient Implementation of Population-Count Function in 32-Bit Mode

179

 

 

Efficient Binary-to-ASCII Decimal Conversion

181

 

 

Derivation of Algorithm, Multiplier, and Shift Factor for Integer Division by Constants

186

 

 

 

Optimizing Integer Division

 

192

 

 

 

Chapter 8

Integer Optimizations

159

Page 175
Image 175
AMD 250 manual Chapter Integer Optimizations, 159