X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id DF0719DCB9D for ; Fri, 20 Jan 2006 18:50:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 97917-06 for ; Fri, 20 Jan 2006 18:50:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 72E4D9DCB84 for ; Fri, 20 Jan 2006 18:50:34 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k0KMoaed006112; Fri, 20 Jan 2006 17:50:36 -0500 (EST) To: Ron cc: Martijn van Oosterhout , pgsql-performance@postgreSQL.org Subject: Re: [GENERAL] Creation of tsearch2 index is very slow In-reply-to: <7.0.1.0.2.20060120174141.039b03e8@earthlink.net> References: <43D0ED57.1020608@gmx.de> <17454.1137771321@sss.pgh.pa.us> <20060120170452.GC31908@svana.org> <26153.1137784469@sss.pgh.pa.us> <20060120201036.GE31908@svana.org> <26583.1137788505@sss.pgh.pa.us> <20060120205132.GF31908@svana.org> <26958.1137791955@sss.pgh.pa.us> <20060120213754.GG31908@svana.org> <7.0.1.0.2.20060120174141.039b03e8@earthlink.net> Comments: In-reply-to Ron message dated "Fri, 20 Jan 2006 17:46:34 -0500" Date: Fri, 20 Jan 2006 17:50:36 -0500 Message-ID: <6111.1137797436@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.094 required=5 tests=[AWL=0.094] X-Spam-Score: 0.094 X-Spam-Level: X-Archive-Number: 200601/374 X-Sequence-Number: 16852 Ron writes: > For an even more extreme speedup, don't most modern CPUs have an asm > instruction that counts the bits (un)set (AKA "population counting") > in various size entities (4b, 8b, 16b, 32b, 64b, and 128b for 64b > CPUs with SWAR instructions)? Yeah, but fetching from a small constant table is pretty quick too; I doubt it's worth getting involved in machine-specific assembly code for this. I'm much more interested in the idea of improving the furthest-distance algorithm in gtsvector_picksplit --- if we can do that, it'll probably drop the distance calculation down to the point where it's not really worth the trouble to assembly-code it. regards, tom lane