CMPT 120 Lecture Notes - Lecture 28: Linear Search, Binary Search Algorithm, Instruction Set
meghan78 and 39786 others unlocked
29
CMPT 120 Full Course Notes
Verified Note
29 documents
Document Summary
One measure is how fast our algorithm can determine the solution. This is not the only measure, nor is it always the best measure. The speed the cpu can process operations. The efficiency of your code (the number of operations needed to complete your calculations). This may depend on the size of the data set being analyzed. This depends on the particular implementation of the algorithm. (processor speed; instruction set, disk speed, brand of compiler and etc. ) How many other things your computer is doing at the same time. Determine an upper limit on the number of operations needed. Know your cpu speed (cycles per second): implement your algorithm then make measurements of how long it takes to run for data sets of varying sizes. Create a common baseline, run tests on same machine with same background load. Disadvantage: you already have spent the time coding and testing if the algorithm is not practical this may have been wasted.