3 ms·
It's somewhat meaningless to compute exact cross-overs for big-O complexities without the constant factors. That is, the actual times for the algorithms are C1
by dbaupp 5y ago
It's somewhat meaningless to compute exact cross-overs for big-O complexities without the constant factors. That is, the actual times for the algorithms are C1 * sqrt(n) + ... and C2 * log(n)^3 + ..., where the ... are lower-order terms. The exact ratio of C1 and C2 (and even the lower-order terms) can have a large impact on the crossover:
- C1 = C2 = 1 => cross-over is 2x10^7
- C1 = 1, C2 = 10 => cross-over is 2x10^10
- C1 = 10, C2 = 1 => cross-over is 1668.2!