<Li> Virtual memory (often on disk) - this gives the illusion of lots of memory, and operates thousands of times slower than RAM . </Li> <P> An algorithm whose memory needs will fit in cache memory will be much faster than an algorithm which fits in main memory, which in turn will be very much faster than an algorithm which has to resort to virtual memory . To further complicate the issue, some systems have up to three levels of cache memory, with varying effective speeds . Different systems will have different amounts of these various types of memory, so the effect of algorithm memory needs can vary greatly from one system to another . </P> <P> In the early days of electronic computing, if an algorithm and its data wouldn't fit in main memory then the algorithm couldn't be used . Nowadays the use of virtual memory appears to provide lots of memory, but at the cost of performance . If an algorithm and its data will fit in cache memory, then very high speed can be obtained; in this case minimising space will also help minimise time . An algorithm which will not fit completely in cache memory but which exhibits locality of reference may perform reasonably well . </P> <Ul> <Li> quicksort, the first known sorting algorithm with a speed of order O (n log ⁡ n) (\ displaystyle O (n \ log n) \,) </Li> <Li> heapsort, another fast sorting algorithm </Li> <Li> binary search, for searching an ordered table </Li> <Li> Boyer--Moore string search algorithm, for finding a string within another string </Li> </Ul>

Parameters to judge the efficiency of an algorithm