Big O Notation: Less Scary Than You Might Think

Home » Blog » Software » Big O Notation: Less Scary Than You Might Think

As a software developer chances are that at some time in your professional life you’ll come across a mathematical concept called Big O notation. Now, if you happen to not have a traditional university computer science / maths background, you might have a bit of a hard time grasping the common – usually strictly mathematical – explanations of Big O notation.

Big O notation is tremendously useful for reasoning about performance and memory consumption of algorithms. Depending on the exact nature of your work your life might not exactly depend on it but even when developing something as seemingly mundane as CRUD applications being able to analyze the performance of a particular sorting or search algorithm might come in handy at times.

The Wikipedia article on Big O notation outlines it this way:

Big O notation is a mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity.

[ … ]

In computer science, big O notation is used to classify algorithms by how they respond to changes in input size, such as how the processing time of an algorithm changes as the problem size becomes extremely large.

As the professor of my data structures class at university once put it: “Big O notation is a way of describing something inexact in exact terms.” (which in my opinion says a lot about the inherent elegance of mathematics)

While I absolutely recommend learning about relevant mathematical concepts in abstract terms, because this’ll both help you with abstract thinking and give you a deeper understanding of how software works (particularly in this time of rekindled interest in AI and machine learning) sometimes it helps thinking about these concepts in the kind of language you’re used to from everyday work, which of course is programming language:

Fellow IT freelancer Rob Bell some time ago published an article titled A beginner’s guide to Big O notation, in which he gives simple examples of common algorithm performance behaviours by using a notation every programmer uses every day: for-loops.

Now, while it’s by no means complete or extensive the explanation provided in the article should give you a very good idea about what the concept of Big O notation is about and how to apply it in a very pragmatic manner.

Leave a Comment

* Checkbox GDPR is required

*

I agree

By continuing to browse the site you agree to our use of cookies. Privacy Policy

Privacy Preference Center

Strictly necessary

These cookies are necessary for the site to function.

PHPSESSID: Preserves user session state across page requests.

__cfduid: Used by the content network, Cloudflare, to identify trusted web traffic.

PHPSESSID
__cfduid

Preferences

Remembers the user's submitted data when a comment is submitted in a blog post. The purpose is to aut o-populate form fields for subsequent comments, in order to save time for the user.

wfvt_#

Statistics

Statistic cookies help us to understand how visitors interact with our websites by collecting and reporting information anonymously.

_ga: Registers a unique ID that is used to generate statistical data on how the visitor uses the website.

_gat: Used by Google Analytics to throttle request rate.

_gid: Registers a unique ID that is used to generate statistical data on how the visitor uses the website.

collect: Used to send data to Google Analytics about the visitor's device and behaviour. Tracks the visitor across d evices and marketing channels.

_ga,_gat,_gid
collect

Security

We use Wordfence to secure our website against hacking attempts: https://www.wordfence.com/

wordfence_verifiedHuman

Close your account?

Your account will be closed and all data will be permanently deleted and cannot be recovered. Are you sure?