I think it's obvious that reverse() is a lot slower than search().
reverse() has to allocate memory, then copy every char in the string,
and then hash it into the string table.

A standard textbook Boyer-Moore implementation would on average have
to go through half the haystack string, so it should (on average) be
four times faster than reverse(): Reading n/2 chars vs reading and
writing n chars. If search() is any slower than that (barring perhaps
some extra startup overhead) then we should toss the implementation
asap.
  • range operato... Hedda (Lite ���) @ Pike (-) developers forum
    • range op... Mirar @ Pike developers forum
      • rang... Jonas Walld�n @ Pike developers forum
        • ... Martin Stjernholm, Roxen IS @ Pike developers forum
          • ... Johan Sundstr�m (Achtung Liebe!) @ Pike (-) developers forum
          • ... Hedda (Lite ���) @ Pike (-) developers forum
            • ... Martin Stjernholm, Roxen IS @ Pike developers forum
              • ... Martin Bähr
                • ... Martin Stjernholm, Roxen IS @ Pike developers forum
                • ... Martin Baehr
                • ... Per Hedbor () @ Pike (-) developers forum
                • ... Jonas Walld�n @ Pike developers forum
                • ... Per Hedbor () @ Pike (-) developers forum
                • ... Martin Stjernholm, Roxen IS @ Pike developers forum
                • ... Per Hedbor () @ Pike (-) developers forum
    • range op... Martin Stjernholm, Roxen IS @ Pike developers forum
      • rang... Hedda (Lite ���) @ Pike (-) developers forum
        • ... Martin Stjernholm, Roxen IS @ Pike developers forum

Reply via email to