Introduction | Languages | Documentation | News | Implementations | Scorecard | Recent Changes | Mailing List | Wiki | Alioth |
Array Access
About this testFor this test, each program should be implemented in the same way. Originally this test was pretty much the same as the array test from Timing Trials, or, the Trials of Timing: Experiments with Scripting and User-Interface Languages by Brian W. Kernighan and Christopher J. Van Wyk. My original implementation of this test was pretty close to the Kernighan and Wyk version. I also did an experiment of manually unrolling the loop around the array. These two versions of the test are now obsoleted and superceded by this page. This test is supposed to just test array access via subscripting. However, the original test didn't take into account array initilization overhead, and so in this version we create an array and then re-use it many times. Note that one loop counts down from the end of the array to the beginning. This is to give the advantage to a random-access data structure, as an array should be, and not just any sequence data structure, as such as a list. |