Re: tsearch parser inefficiency if text includes urls or emails - new version
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Cc: greg@2ndquadrant.com, pgsql-hackers@postgresql.org, oleg@sai.msu.su, teodor@sigaev.ru
Date: 2009-12-08T16:17:19Z
Lists: pgsql-hackers
On Tuesday 08 December 2009 17:15:36 Kevin Grittner wrote: > Andres Freund <andres@anarazel.de> wrote: > > Could you show your testcase? Will hopefully look into this later. > > I dont see why it could get slower? > I don't either. The best I can tell, following the pointer from > orig to any of its elements seems to be way more expensive than I > would ever have guessed. The only thing that seemed to improve the > speed was minimizing that by using a local variable to capture any > element referenced more than once. (Although, there is overlap > between the timings for the original patch and the one which seemed > a slight improvement; I would need to do more testing to really rule > out noise and have complete confidence that my changes actually are > an improvement on the original patch.) > > Perhaps it is some quirk of using 32 bit pointers on the 64 bit AMD > CPU? (I'm looking forward to testing this today on a 64 bit build > on an Intel CPU.) Did you test that with a optimized build? Andres