Writing code with efficiency in mind