|
From: | Paul Eggert |
Subject: | Re: Returning argument string (regexp-quote) |
Date: | Tue, 24 Sep 2019 11:24:12 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
On 9/24/19 10:44 AM, Mattias Engdegård wrote:
What about the specific case of regexp-quote then? It was responsible for a sizeable portion of local consing in some (non-public) code I was profiling. Would the change need a mention in NEWS, and/or its doc string?
The performance case for regexp-quote is reasonably strong. This is similar to the 'format' function, which is called a lot, which does not allocate a string if its argument is simple, and where its callers are extremely unlikely to rely on its allocating a string in that case.
Changes should be mentioned in NEWS and the adjusted behavior should be mentioned in the manual; I don't think it needs to be in the doc string. Please see commit 2017-10-04T21:29:58Z!address@hidden for how the doc was done in the 'format' case.
[Prev in Thread] | Current Thread | [Next in Thread] |