aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2016-09-26 05:08:30 +0100
committerStephen Blott2016-09-26 05:08:30 +0100
commit8c1957e600cff896b2a673d7ba8dbcaa132b37e5 (patch)
tree6498424b65e6b7b891b18925a29c0fbed7882320
parent92477459341c1308ac48dad46617aea5de788089 (diff)
downloadvimium-8c1957e600cff896b2a673d7ba8dbcaa132b37e5.tar.bz2
Fix comment.
Thinking about it more carefully, this algorithm is always O(n^2).
-rw-r--r--content_scripts/link_hints.coffee3
1 files changed, 1 insertions, 2 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index cf8d40c0..b4b63b1f 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -339,8 +339,7 @@ class LinkHintsMode
# Fill in the markers' rects, if necessary.
marker.markerRect ?= marker.getClientRects()[0] for marker in localHintMarkers
- # Calculate the overlapping groups of hints. This is O(n^2) in the best case and O(n^3) in the worst
- # case.
+ # Calculate the overlapping groups of hints. We call each group a "stack". This is O(n^2).
stacks = []
for marker in localHintMarkers
stackForThisMarker = null