diff options
| author | ChenXiaoSong <chenxiaosong@kylinos.cn> | 2025-12-23 17:24:40 +0800 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-02-08 21:24:41 -0600 |
| commit | 75563adbb91d9d199b33f8b9a2fe4e9cafea6a69 (patch) | |
| tree | 9ef5e588e00c43b4da0092bbdfd8746b1abdf8d9 /rust/alloc/collections/git@git.tavy.me:linux.git | |
| parent | 453382f15b0e9b74fc83d364ffa68fa5e4806485 (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
