全部 标题 作者
关键词 摘要

OALib Journal期刊
ISSN: 2333-9721
费用:99美元

查看量下载量

相关文章

更多...

Fast and Vectorizable Alternatives to Binary Search

Full-Text   Cite this paper   Add to My Lib

Abstract:

Given an array X of N+1 strictly ordered floating point numbers and an array Z of M floating point numbers belonging to the interval [X[0],X[N]), a common problem in numerical methods algorithms is to find the indices of the largest numbers in the array X which are smaller or equal than the numbers in the array Z. The general solution to this problem is the well known "binary search" algorithm, which has complexity O(M log2 N). This paper describes improvements to the binary search algorithm, which are faster and vectorizable (SIMD-friendly). Next it proposes a new vectorizable algorithm based on a indexing technique, which reduces complexity of search operations to O(M). Some benchmark test results using SSE2 instructions demonstrate that with N=1025 the proposed algorithm is about 26 times faster than the classical binary search in single precision and 15 times faster in double precision.

Full-Text

Contact Us

service@oalib.com

QQ:3279437679

WhatsApp +8615387084133