Re: levenshtein_less_equal (was: multibyte charater set in levenshtein function) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: levenshtein_less_equal (was: multibyte charater set in levenshtein function)
Date
Msg-id 26040.1286981519@sss.pgh.pa.us
Whole thread Raw
In response to Re: levenshtein_less_equal (was: multibyte charater set in levenshtein function)  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: levenshtein_less_equal (was: multibyte charater set in levenshtein function)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Tom Lane's message of mié oct 13 10:32:36 -0300 2010:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> I spent some time hacking on this.  It doesn't appear to be too easy
>>> to get levenshtein_less_equal() working without slowing down plain old
>>> levenshtein() by about 6%.
>> 
>> Is that really enough slowdown to be worth contorting the code to avoid?
>> I've never heard of an application where the speed of this function was
>> the bottleneck.

> What if it's used on a expression index on a large table?

So?  Expression indexes don't result in multiple evaluations of the
function.  If anything, that context would probably be even less
sensitive to the function runtime than non-index use.

But the main point is that 6% performance penalty in a non-core function
is well below my threshold of pain.  If it were important enough to care
about that kind of performance difference, it'd be in core.  I'd rather
see us keeping the code simple, short, and maintainable.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Extensions, this time with a patch
Next
From: Simon Riggs
Date:
Subject: Re: Issues with two-server Synch Rep