Source: Legend Web Solutions Blog

Legend Web Solutions Blog How to Write Efficient Code (by example) Part 1: Databases and Loops

TL;DR - How to write efficient code when using loops Bring as much code outside the loop as possible, especially lines that are computationally expensive (such as querying the database) because loops are O(n) "big-oh of n" and need to be run once for every input item, whereas code outside a loop is O(c) "constant time" and take the same amount of ...Read MoreThe post How to Write Efficient Code (by example) Part 1: Databases and Loops appeared first on Legend Web Solutions.

Read full article »
Est. Annual Revenue
$5.0-25M
Est. Employees
25-100
CEO Avatar

CEO

Update CEO

CEO Approval Rating

- -/100