Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQgVk-0005Xw-Ts for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Jan 2017 20:25:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cQgVk-0002eb-DO for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Jan 2017 20:25:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cQgVi-0002d2-GD for pgsql-hackers@postgresql.org; Mon, 09 Jan 2017 20:25:42 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cQgVe-0008EX-NH for pgsql-hackers@postgresql.org; Mon, 09 Jan 2017 20:25:41 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id C702621CFE; Mon, 9 Jan 2017 15:25:36 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Mon, 09 Jan 2017 15:25:36 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=mn+77D2DWxKw53wnhLbaS2fMSPQ=; b=G6Z2GO3xro/YcHgHThXq +nU9lqjMyui2s50oQ3rykAcGODq8UllMPPMmbYdOw2vJdXizke4LvAHWfHBJg7pd X+jG6QG+y7YlfaWfZxHX/89mrClOsT9jpHOKU4AuA+OFD4jdbez5UN9XAXY1udG/ tHr/t4F3DHjw5JemQlBMCyo= X-ME-Sender: X-Sasl-enc: 8mlwuNkiQDsfMtrZhscEL+ixVoyr6hWbXBDzUXEFIU6O 1483993536 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 918F67EA41; Mon, 9 Jan 2017 15:25:36 -0500 (EST) Subject: Re: ICU integration To: Peter Geoghegan References: <85364fde-091f-bbc0-fec2-e3ede39840a6@2ndquadrant.com> <3a88fa29-275b-f547-9957-86d4b2cd68db@2ndquadrant.com> Cc: pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <6261dcf6-5bd1-a4ce-a800-54b34d696b3e@2ndquadrant.com> Date: Mon, 9 Jan 2017 15:25:36 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 1/7/17 10:01 PM, Peter Geoghegan wrote: > It occurs to me that the comparison caching stuff added by commit > 0e57b4d8b needs to be considered here, too. When we had to copy the > string to a temp buffer anyway, in order to add the terminating NUL > byte expected by strcoll(), there was an opportunity to do caching of > comparisons at little additional cost. However, since ICU offers an > interface that you're using that doesn't require any NUL byte, there > is a new trade-off to be considered -- swallow the cost of copying > into our own temp buffer solely for the benefit of comparison caching, > or don't do comparison caching. (Note that glibc had a similar > comparison caching optimization itself at one point, built right into > strcoll(), but it was subsequently disabled.) That might be worth looking into, but it seems a bit daunting to construct a benchmark specifically for this, unless we have the one that was originally used lying around somewhere. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers