summaryrefslogtreecommitdiff
path: root/rust/alloc/collections/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorChenXiaoSong <chenxiaosong@kylinos.cn>2025-12-23 17:24:40 +0800
committerSteve French <stfrench@microsoft.com>2026-02-08 21:24:41 -0600
commit75563adbb91d9d199b33f8b9a2fe4e9cafea6a69 (patch)
tree9ef5e588e00c43b4da0092bbdfd8746b1abdf8d9 /rust/alloc/collections/git@git.tavy.me:linux.git
parent453382f15b0e9b74fc83d364ffa68fa5e4806485 (diff)
smb/client: use bsearch() to find target in smb2_error_map_table
The smb2_error_map_table array currently has 1740 elements. When searching for the last element, the original loop-based search method requires 1740 comparisons, while binary search algorithm requires only 10 comparisons. Suggested-by: David Howells <dhowells@redhat.com> Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Reviewed-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/linux-cifs/20260106071507.1420900-5-chenxiaosong.chenxiaosong@linux.dev/ Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'rust/alloc/collections/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions