Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Algorithmic efficiency
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Distinguish|text=[[program optimization]], [[optimizing compiler]], [[loop optimization]], [[object code optimizer]]}} {{multiple| {{More citations needed|date=January 2024}} {{Tone|date=January 2024}}{{short description|Property of an algorithm}} }} {{Use dmy dates|date=February 2023}} In [[computer science]], '''algorithmic efficiency''' is a property of an [[algorithm]] which relates to the amount of [[computational resource]]s used by the algorithm. Algorithmic efficiency can be thought of as analogous to engineering [[productivity]] for a repeating or continuous process. For maximum efficiency it is desirable to minimize resource usage. However, different resources such as [[Time complexity|time]] and [[Space complexity|space]] complexity cannot be compared directly, so which of two algorithms is considered to be more efficient often depends on which measure of efficiency is considered most important. For example, [[bubble sort]] and [[timsort]] are both [[Sorting algorithm|algorithms to sort a list]] of items from smallest to largest. Bubble sort organizes the list in time proportional to the number of elements squared (<math display="inline">O(n^2)</math>, see [[Big O notation]]), but only requires a small amount of extra [[computer memory|memory]] which is constant with respect to the length of the list (<math display="inline">O(1)</math>). Timsort sorts the list in time [[linearithmic]] (proportional to a quantity times its logarithm) in the list's length (<math display="inline">O(n\log n)</math>), but has a space requirement [[Proportionality (mathematics)|linear]] in the length of the list (<math display="inline">O(n)</math>). If large lists must be sorted at high speed for a given application, timsort is a better choice; however, if minimizing the [[memory footprint]] of the sorting is more important, bubble sort is a better choice.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)