Tag Archives: string

SSE2 and BNDM string search

For the past few weeks, I’ve been testing and experimenting with the Railgun string search function written by Sanmayce. Railgun is really a “memmem” function, where the target length is known in advance; and the cost of compiling the pattern … Continue reading

Posted in algorithm, SSE2, string search | Tagged , , , , , , | 8 Comments

What the !@# is SSE2 good for: char search in long strings

You don’t need SSE4.2 to do some neat string operations with XMM registers. Case in point: using 16-byte parallelism, searching for a character in a null-terminated character string — aka strchr. Smart implementations of strchr don’t simply test each byte … Continue reading

Posted in Uncategorized | Tagged , , , | 10 Comments