commit | 8978883ee20922eaf6d88872c701b033f0458dd3 | [log] [tgz] |
---|---|---|
author | Simon Glass <sjg@chromium.org> | Sat Oct 19 09:21:47 2024 -0600 |
committer | Simon Glass <sjg@chromium.org> | Sat Nov 02 11:13:59 2024 -0600 |
tree | 792545e85e3308e171ed70646e1d59a349e9e641 | |
parent | 6724fa803d75648805b7b42aa513a24b85cfdb9a [diff] |
alist: Add a way to efficiently filter an alist Unlike linked lists, it is inefficient to remove items from an alist, particularly if it is large. If most items need to be removed, then the time-complexity approaches O(n2). Provide a way to do this efficiently, by working through the alist once and copying elements down. Signed-off-by: Simon Glass <sjg@chromium.org>