small optimization for irregular cases

 * shorter haystack than needle
 * haystack or needle is empty
rename test function