From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [RFC] temporary Lisp_Strings Date: Tue, 02 Sep 2014 10:00:15 -0400 Message-ID: References: <5405BE5D.1090003@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409666695 18951 80.91.229.3 (2 Sep 2014 14:04:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Sep 2014 14:04:55 +0000 (UTC) Cc: Emacs development discussions To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 02 16:04:48 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XOohT-0002kO-0f for ged-emacs-devel@m.gmane.org; Tue, 02 Sep 2014 16:04:47 +0200 Original-Received: from localhost ([::1]:38303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOohS-0006lv-H2 for ged-emacs-devel@m.gmane.org; Tue, 02 Sep 2014 10:04:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOohH-0006kN-Oy for emacs-devel@gnu.org; Tue, 02 Sep 2014 10:04:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOohA-00049A-9p for emacs-devel@gnu.org; Tue, 02 Sep 2014 10:04:35 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:57349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOod7-0003IB-1b for emacs-devel@gnu.org; Tue, 02 Sep 2014 10:00:17 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFpZEG/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBVhYKAwULCw4mEhQYDSSIBAjSGReOegeEOASjKoVvgWqDTCGBLCQ X-IPAS-Result: ArUGAIDvNVNFpZEG/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBVhYKAwULCw4mEhQYDSSIBAjSGReOegeEOASjKoVvgWqDTCGBLCQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="88513536" Original-Received: from 69-165-145-6.dsl.teksavvy.com (HELO ceviche.home) ([69.165.145.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Sep 2014 10:00:16 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id F30CF660C4; Tue, 2 Sep 2014 10:00:15 -0400 (EDT) In-Reply-To: <5405BE5D.1090003@yandex.ru> (Dmitry Antipov's message of "Tue, 02 Sep 2014 16:55:57 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173950 Archived-At: > I'm thinking about temporary Lisp_Strings on C stack (allocated with alloca). > Simple implementation (with no check whether it fits on stack) and a few use > cases attached. Among others, the question is: is there a way to make sure > that an address returned by alloca fits in Lisp_Object? Have you made some preliminary measurements (on microbenchmarks) to try and see how much speed up we might gain? Given the cost of strlen and parse_str_as_multibyte, I'd expect that the best-case benefit might turn out to be rather small. Stefan