Amortized Cost
noun
say it: “AM-er-tyzd KAWST” /ˈæmərˌtaɪzd kɔst/
The average cost of an operation over a long run of them, when a rare expensive step is spread across many cheap ones.
What is amortized cost?
Amortized cost is what an operation costs on average over a long run, when an occasional expensive step is spread across many cheap ones, like a yearly fee thought of as a monthly one. Adding to a growing array is amortized O(1): a moving day copies everything, but doubling makes moving days so rare that n adds copy fewer than 2n items in all.
In a sentence
- “Adding to a list has an amortized cost of O(1): the occasional copy is spread over all the cheap adds.”
Level: Journeyman · More Software Development terms at this level
Updated