An Interest In:
Web News this Week
- April 20, 2024
- April 19, 2024
- April 18, 2024
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
February 23, 2022 10:44 am GMT
Original Link: https://dev.to/bellatrix/big-o-analysis-is-awesome-except-when-its-not-3dl2
Big O analysis is awesome except when it's not
Asymptotic analysis is a powerful tool, but wield it wisely.
Big O ignores constants, but sometimes the constants matter. If we have a script that takes 5 hours to run, an optimization that divides the runtime by 5 might not affect big O, but it still saves you 4 hours of waiting.
Beware of premature optimization. Sometimes optimizing time or space negatively impacts readability or coding time. For a young startup it might be more important to write code that's easy to ship quickly or easy to understand later, even if this means it's less time and space efficient than it could be.
Original Link: https://dev.to/bellatrix/big-o-analysis-is-awesome-except-when-its-not-3dl2
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To