Project

General

Profile

Actions

Optimization #1223

closed

Might be faster to use memmem() for short length content instead of Boyer Moore

Added by Ken Steele almost 10 years ago. Updated about 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Effort:
Difficulty:
Label:

Description

Boyer Moore works best with longer needles. It is currently used for all length content compares. It might be faster to use glibc's memmem() function to case matches, given that it can be implemented with SIMD operations processing 8 or 16 bytes at a time.

Some investigation would be needed to determine if it is faster and for what length needles.

glibc doesn't provide memcasemem(), but a SIMD version could be written for this too, for the nocase matches.

Actions

Also available in: Atom PDF