多维数组怎样快速索引

来源:互联网 发布:软件著作权与版权 编辑:程序博客网 时间:2024/04/30 15:13

Table of Contents

  1. How to create a multi-dimensional array
  2. How to loop through a multi-dimensional array
    1. Method 1: Nested loops with multiple arrays
    2. Method 2: Nested loops with linear array and indexes with 3 multiplies
    3. Method 3: Nested loops with linear array and indexes with 2 multiplies
    4. Method 4: Nested loops with linear array and invariant multiplies out of loops
    5. Method 5: Nested loops with linear array and invariant multiplies saved in an array
    6. Method 6: Nested loops with linear array and single incrementing index
    7. Method 7: Nested loops with linear array and single incrementing pointer
    8. Method 8: Single loop with linear array and incrementing index
    9. Method 9: Single loop with linear array and incrementing pointer
  3. Test specification
  4. Benchmark results – compiled without optimizations
  5. Benchmark results – compiled with optimizations
  6. Conclusions
  7. Further reading
    1. Related articles at NadeauSoftware.com
    2. Web articles
0 0