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: Stack-allocated objects again (+benchmark) Date: Mon, 29 Sep 2014 11:09:10 +0400 Message-ID: <54290596.4060702@yandex.ru> 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 1411974601 18976 80.91.229.3 (29 Sep 2014 07:10:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Sep 2014 07:10:01 +0000 (UTC) To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 29 09:09:55 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 1XYV5m-0000cL-3f for ged-emacs-devel@m.gmane.org; Mon, 29 Sep 2014 09:09:54 +0200 Original-Received: from localhost ([::1]:34611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYV5l-0003mV-LO for ged-emacs-devel@m.gmane.org; Mon, 29 Sep 2014 03:09:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYV5S-0003mH-Kx for emacs-devel@gnu.org; Mon, 29 Sep 2014 03:09:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYV5L-0006Uy-CZ for emacs-devel@gnu.org; Mon, 29 Sep 2014 03:09:34 -0400 Original-Received: from forward9l.mail.yandex.net ([84.201.143.142]:58988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYV5L-0006TZ-56 for emacs-devel@gnu.org; Mon, 29 Sep 2014 03:09:27 -0400 Original-Received: from smtp3h.mail.yandex.net (smtp3h.mail.yandex.net [84.201.186.20]) by forward9l.mail.yandex.net (Yandex) with ESMTP id C22EAE612CC for ; Mon, 29 Sep 2014 11:09:11 +0400 (MSK) Original-Received: from smtp3h.mail.yandex.net (localhost [127.0.0.1]) by smtp3h.mail.yandex.net (Yandex) with ESMTP id 6B2311B452AE for ; Mon, 29 Sep 2014 11:09:11 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp3h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 99baXZfne5-9AOKrFp2; Mon, 29 Sep 2014 11:09:10 +0400 (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: ed195b65-70a5-493c-b8fc-7e125a049d3a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1411974550; bh=k7ihUrNxqt28zpXMUHK0zTo8sI04NdaTERAN0dYOulg=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Content-Transfer-Encoding; b=RuMOzL0Aai6Ruusd/hpcVDr/Ve135NxsninXMlbwSwdSyhuzaORJEvFUIigFOov5H P8ygzr92aFIUFwfoaor8iaPxm9eGqlke3Ya6hkpdhOWucv9sR5xTAvFOAiCWddu8NS 9lSpzIL3oQvXuZWXrgkGo+Aqurv3mGh5DNNIOBMw= Authentication-Results: smtp3h.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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 84.201.143.142 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:174793 Archived-At: 1) In r117971, I've made an attempt to follow KISS principle and redesign this stuff for simplicity and speed rather than versatility. 2) I am constantly asked about benchmarks. OK, running this code: (defun put-property-benchmark () (interactive) (setq buffer-undo-list t) (let ((oldgc gcs-done) (oldtime (float-time))) (while (re-search-forward "[a-f0-9]+" nil t) (put-text-property (match-beginning 0) (match-end 0) 'face 'font-lock-comment-face)) (message "GCs: %d Elapsed time: %f seconds" (- gcs-done oldgc) (- (float-time) oldtime)))) through a ~35M dump generated with od -v -t x2 < glibc-2.19.tar.xz > glibc.txt shows 55GCs/23.7s with USE_STACK_LISP_OBJECTS and 66GCs/27.9s without them. Hopefully this simple benchmark is "real enough". Dmitry