»
Comparisons: To move data from one location in a dataset to another, you
need to know where to move it, which means comparing the target data to
other data in the dataset. Having fewer comparisons means better performance.
»
Exchanges: Depending on how you write an algorithm, the data may not get
to its final location in the dataset on the first try. The data might actually move
several times. The number of exchanges affects speed considerably because
now you’re actually moving data from one location to another in memory.
Fewer and smaller exchanges (such as when using indexes) means better
performance.
Do'stlaringiz bilan baham: |