The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Please edit your node and put code tags around your arrays , besides @array=[] is broken syntax.
Concerning your question, the fastest way would be to mimic the algorithm index is using in its implementation. (Forgot the name...)° For this you need to prepare jump tables for each array.
editA pragmatic approach would be to generate a string for each array, something like concatenation of the first character. If the first-character string isn't found with index you can proceed, otherwise index gives you a hint where to compare both arrays!
Cheers Rolf
°) here it is Boyer-Moore_string_search_algorithm In reply to Re: Fast Way to find one array in second array
by LanX
|
|