From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: Stack-allocated objects again (+benchmark) Date: Tue, 30 Sep 2014 12:25:48 +0400 Message-ID: <542A690C.7050902@yandex.ru> References: <54290596.4060702@yandex.ru> <542A18E8.9030601@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1412065593 28600 80.91.229.3 (30 Sep 2014 08:26:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Sep 2014 08:26:33 +0000 (UTC) Cc: Emacs development discussions To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 30 10:26:26 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 1XYslO-0000YO-MK for ged-emacs-devel@m.gmane.org; Tue, 30 Sep 2014 10:26:26 +0200 Original-Received: from localhost ([::1]:41507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYslO-0003Dq-9o for ged-emacs-devel@m.gmane.org; Tue, 30 Sep 2014 04:26:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYsl2-0003Dj-Gh for emacs-devel@gnu.org; Tue, 30 Sep 2014 04:26:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYskv-0007L2-Fe for emacs-devel@gnu.org; Tue, 30 Sep 2014 04:26:04 -0400 Original-Received: from forward2p.cmail.yandex.net ([77.88.31.17]:33185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYskv-0007JU-5A for emacs-devel@gnu.org; Tue, 30 Sep 2014 04:25:57 -0400 Original-Received: from smtp17.mail.yandex.net (smtp17.mail.yandex.net [95.108.252.17]) by forward2p.cmail.yandex.net (Yandex) with ESMTP id 5AE9C12EE; Tue, 30 Sep 2014 12:25:49 +0400 (MSK) Original-Received: from smtp17.mail.yandex.net (localhost [127.0.0.1]) by smtp17.mail.yandex.net (Yandex) with ESMTP id 178B31900C81; Tue, 30 Sep 2014 12:25:48 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp17.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 1nqsNissJo-PmNOd0Mp; Tue, 30 Sep 2014 12:25:48 +0400 (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 160c0996-77ea-4f33-9363-9e78d34615bb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1412065548; bh=9rN5q0+yCn6qz9W7Lh3ziO2b7LyXrykGr13gpntz5is=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=SCCgsYRSFJSjHz2E2kKIVFFxyoqhbs0pnpwTuS8uupllcfLGr7i7tivJsQ3T9OGHo hJ60q7LUb7nhVQSLQJsaU1EFaZagzmUeH+QO3BOaPGazF7dj5MHj7J1d5bKj50RMXE E2f2bu+aXKDqvnjtSwvCMLTSHc2DlzOuAthRqRvE= Authentication-Results: smtp17.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 In-Reply-To: <542A18E8.9030601@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 77.88.31.17 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:174830 Archived-At: On 09/30/2014 06:43 AM, Paul Eggert wrote: > Thanks for doing that, and for the benchmark. I found a couple of problems with >< the patch, and thought of some ways to simplify it further and make it more portable > and a bit faster in many cases, and installed that as trunk bzr 117978. Please have > a look when you have the time. 1) Thanks, I like an idea with SCOPED_STRING without an extra allocation and memcpy. 2) This snippet from lisp.h: 4597 /* USE_STACK_LISP_OBJECTS requires GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS. */ 4598 4599 #if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS 4600 # undef USE_STACK_LISP_OBJECTS 4601 # define USE_STACK_LISP_OBJECTS false 4602 #endif conflicts with alloc.c: 72 #if USE_STACK_LISP_OBJECTS 73 # if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS 74 # error "Stack-allocated Lisp objects are not compatible with GCPROs" 75 # endif 76 #endif If you prefer 1st (I'm OK with that), 2nd one should be removed. Dmitry