Analysis Of Knuth-Morris-Pratt, Boyer-Moore, And Boyer-Moore Horspool Search Algorithms In A Product Search Feature (Case Study: Sumber Rejeki Utama Building Materials Store)
This study analyzes and compares the performance of the Knuth-Morris-Pratt (KMP), Boyer-Moore (BM), and Boyer-Moore-Horspool (BMH) string-matching algorithms in an item-search feature at Toko Bangunan Sumber Rejeki Utama. A comparative experiment was conducted using approximately 1,000 and 5,000 item records and three keyword lengths: "kuas", "paku beton", and "cat tembok interior". Each scenario was executed 30 times in Laravel and CodeIgniter 4 environments on two different computers. Performance was evaluated using mean execution time, standard deviation, paired t-test p-values, and relative efficiency. Across 24 scenarios, BM recorded the lowest mean execution time in 12 scenarios, BMH in 9 scenarios, and KMP in 3 scenarios. In terms of consistency, KMP had the smallest standard deviation in 11 scenarios, followed by BMH in 7 and BM in 6. Most pairwise differences were statistically significant; the only non-significant BM-KMP comparisons occurred in the short-keyword scenarios on Laravel PC 1 and Laravel PC 2. The findings indicate that no algorithm is universally superior. BM and BMH are generally preferable when lower execution time is prioritized, whereas KMP remains relevant when execution-time stability is important under specific runtime conditions.
Authors
- Nasruddin Bin Idris
- Rahmat Saudi Al Fathir As
- Yeo Win
- Djumhadi
Institutions
- Universitas Mulia (ID)
Publication Details
- Journal
- MULTICA SCIENCE AND TECHNOLOGY (MST)
- Published
- 2026-11-26
- DOI
- https://doi.org/10.47002/8pn55952
- Primary Topic
- Algorithms and Data Compression
- Type
- article
- Field-Weighted Citation Impact
- 0.00