Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How can the pcmpestri instruction be used to write a function similar to strpos function in C++? I can use g++ compiler.
pcmpestri
strpos
pcmpestri is a new instruction that is found in SSE4
在使用 SSE 指令之前,您必须存储浮点堆栈,然后再恢复。这是昂贵的,除非你的字符串很大,否则不值得。对于巨大的字符串,更好的算法是要走的路(Boyer-Moore 等)。