Writing Fast Programs: A Practical Guide for Scientists and Engineers

Part II: Implementation

CHAPTER LIST

Chapter 5: Data Management
Chapter 6: Function and Procedure Calling: Optimizing Program Flow
Chapter 7: Loops and Vectors
Chapter 8: Programming in the RISC Style
Chapter 9: Look-Up Tables
Chapter 10: Other Algorithm Optimization Techniques

OVERVIEW

The manner of memory allocation for data handling is crucial to high performance programming. Some high-level languages, such as C and Pascal, use a paradigm that requires memory be properly allocated before code accessing that memory is executed. This forces the programmer to plan memory allocation, but does not necessarily ensure efficiency.

Other languages, such as C#, BASIC and PERL, do not use the explicit allocation paradigm. This means that memory allocation can be done 'on the fly,' implicit in a memory access statement (such as a variable reference). Since the memory allocation is not specified by the programmer, the most efficient use of memory cannot occur.

Data typing has significant consequences for object code generation by the compiler. As a simple example, consider the statement a = a + 1, which can be compiled to an INC op-code only if a is an integer type. If, on the other hand, a references a memory location holding floating-point data, the INC op-code cannot be used. One thing to remember is that while in algebra variables are abstractions of quantities, in programming the situation is different. The variable name is an abstraction of a reference to memory. How that reference is abstracted obviously influences the compiled...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Programming Languages
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.