To get around (1) (incidental factors): derive measurements analytically rather than experimentally. Typically measure:

To get around (2) (choice of test data): express the above measurement as a function of the input.

Typically: as a function of certain quantifiable properties of the input, such as size.

The efficiency of sorting algorithms is typically the number of comparisons required as a function of the length of the input list.

Efficiency(Merge Sort) = N Log(N), where N is the length of the input list.