Searches: Efficiency


Introduction and Summary

When comparing two algorithms, there are many metrics one could use, but most of these measurements are platform and implementation dependent (meaning that the results of the measurements depend on what type of computer the algorithm is running on, and how well the algorithm was coded. Note that when coding complex algorithm, programmers have a great deal of liberty in what data structures are used, how certain processes are implemented, etc). Computer scientists need a measure for comparing algorithms in abstract terms. This abstract measurement is called efficiency. Efficiency measures the complexity of an algorithm, measuring how many abstract, conceptual operations it needs to perform.

Efficiency is often measured in terms of Big-O notation, written as O() . Algorithms are then described in terms of the number of abstract operations they perform. For example, the bubble sort algorithm runs in O(n 2) time while quicksort runs in O(nlogn) time. By comparing the Big-O's of two algorithms, one can quickly visualize which algorithm will work faster under certain situations.

Take a Study Break

Green YOUR SCHOOL!

Click here to get involved with dosomething.org!

John Krasinski's BIG MIRACLE

Click to watch the trailer and read exclusive star interviews!

Do you like Anna?

Read Dear Albert... from ANNA's perspective!

BATTLESHIP, the movie

Here's why we're super jazzed about it.

Do energy juices actually work?

Our blogger puts 'em to the test!


The Book

Cover image

Read What You Love, Anywhere You Like

Get Our FREE NOOK Reading Apps