2019년 8월 10일 토요일

Rules for Code Tuning

1. 시간 단축을 위한 공간 규칙
- Data Structure Augmentation
- Store Precomputed Results
- Caching
- Lazy Evaluation

2. 공간 절약을 위한 시간 규칙
- Packing
- Interpreters

3. 루프 규칙
- Code Motion Out of Loops
- Combining Tests
- Loop Unrolling
- Transfer-Driven Loop Unrolling
- Unconditional Branch Removal
- Loop Fusion

4. 논리 규칙
- Exploit Algebraic Identities
- Short-Circuiting Monotone Funtions
- Precompute Logical Funtions
- Boolean Variable Elimination

5. 프로시저 규칙
- Collapsing Function Hierarchies
- Exploit Common Cases
-Coroutine
- Transformations on Recursive Functions
  - Recursive -> Iterative
  - Stack
  - Removing Tail Recursion
  - Assistant Procedure
- Parallelism

6. 수식 규칙
- Compile-Time Initialization
- Exploit Algebraic Identities
- Common subexpression Elimination
- Pairing Computation
- Exploit Word Parallelism

※ reference
Programming Pearls 2/e

댓글 없음:

댓글 쓰기