]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Optimize mas_leaf_max_gap() by skipping slots after a gap.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 1 Dec 2020 16:04:49 +0000 (11:04 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:33:30 +0000 (12:33 -0500)
commit989324e610d5b3c21f88387d14c7f0d16534eb0c
tree98dc214fef015f347e1ff91275081af2863c7b55
parent79a1964efc05f900d3262a403d462232ba35a758
maple_tree: Optimize mas_leaf_max_gap() by skipping slots after a gap.

Two gaps cannot happen in a row, so don't bother checking the next slot if there exists a gap.
Also, remove slot[0], slot[1], and slot[max] by checking them first.  This allows for a more
optimal loop

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c