3 ms·
Yes, the size of the data matters, and linear search may be the right choice for many use cases and may outperform more advanced data structures. You learn it o
by molodec 7y ago
Yes, the size of the data matters, and linear search may be the right choice for many use cases and may outperform more advanced data structures. You learn it on the job as it is not a topic usually studied in universities. But I don't agree that we need to completely throw away theory, O complexity analysis where N - input size is the main variable. Microbenchmarks are hard to write correctly. Recreating the scenarios occurring in production is not always possible in the microbenchmark settings. You can write a microbenchmark that shows your code works great, but fails to perform in production because the input data is totally different. bt848 mentioned load test, which is not the same as microbenchmark. Load test that simulates production settings is a better tool to validate the optimizations.
- BeetleB 7y ago>But I don't agree that we need to completely throw away theory, O complexity analysis where N - input size is the main variable. No one here is agreeing with that.