Example of Optimization and Processor-specific Instructions
This example of inline assembly is from the D programming language and computes the tangent of x using the x86's FPU instructions. This is faster than using the floating-point operations that would be emitted by the compiler, and it allows the programmer to make use of the fldpi
instruction, which loads the closest approximation of pi possible on the x86 architecture.
Read more about this topic: Inline Assembler
Famous quotes containing the word instructions:
“If we consider what happens in conversation, in reveries, in remorse, in times of passion, in surprises, in the instructions of dreams, wherein often we see ourselves in masquerade,the droll disguises only magnifying and enhancing a real element, and forcing it on our distinct notice,we shall catch many hints that will broaden and lighten into knowledge of the secret of nature.”
—Ralph Waldo Emerson (18031882)