PopularFX
Home Help Search Login Register
Welcome,Guest. Please login or register.
2026-04-01, 12:22:01
News: Registration with the OUR forum is by admin approval.

Pages: 1 [2]
Author Topic: Pictures Only  (Read 6966 times)

Group: Administrator
Hero Member
*****

Posts: 4577
This is a special thread for uploading my pictures only, which are linked in other threads.

Edit as per discussion with topic owner

   

Group: Tinkerer
Hero Member
*****

Posts: 1950
here you go.
   

Sr. Member
****

Posts: 383
here you go.

Good use of size_t, i like.

Only glanced at it briefly, is this similar to what strstr() does? Looks like it's using some advanced primitives too. Nice work.
   

Group: Administrator
Hero Member
*****

Posts: 4577
it detects whether one string is contained in another string and if it is not then determines the maximum length of the first string's prefix which constitutes the suffix of the second string ...and determines the maximum length of the first string's suffix which constitutes the prefix of the second string.

x86 CPUs can do it in two SSE/SIMD instructions when the strings are less than 17 bytes long.  Longer strings have to be processed in 16 byte chunks while avoiding naively iterating over each character ...or reloading the string from memory multiple times redundantly ...or making comparisons that cannot possibly change the final result like: recomparing the same substrings or checking for containment by comparing substrings in the middle of a haystack when the needle is very long and has a small wiggle-room, etc...
   
Pages: 1 [2]
« previous next »


 

Home Help Search Login Register
Theme © PopularFX | Based on PFX Ideas! | Scripts from iScript4u 2026-04-01, 12:22:01