
对数时间(复杂度):指算法的运行时间随输入规模 \(n\) 增长而按对数增长,常写作 \(O(\log n)\)。在输入规模变大时,增长非常缓慢(例如常见于二分查找、平衡树操作等)。
A binary search runs in logarithmic-time.
二分查找以对数时间运行。
With a balanced tree index, each lookup stays logarithmic-time even as the dataset grows to millions of records.
使用平衡树索引后,即使数据集增长到数百万条记录,每次查询仍能保持对数时间。
/lrmk tam/
logarithmic 来自 logarithm(对数)+ -ic(形容词后缀);而 logarithm 源自希腊语词根,常解释为 logos(比例/理性) 与 arithmos(数) 的组合,表示一种与“数的比例关系”相关的计算概念。time 在计算机科学语境中指“运行时间/时间复杂度”,因此 logarithmic-time 直译就是“对数级的运行时间”。