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: [Emacs-diffs] /srv/bzr/emacs/trunk r109187: Adjust consing_since_gc when objects are explicitly freed. Date: Wed, 25 Jul 2012 13:55:59 +0400 Message-ID: <500FC2AF.9080300@yandex.ru> References: <500D18D4.7010506@yandex.ru> <500D36C6.7000205@yandex.ru> <500E24D0.2040003@yandex.ru> <500E8CAC.3080303@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: dough.gmane.org 1343210027 23807 80.91.229.3 (25 Jul 2012 09:53:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2012 09:53:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 25 11:53:45 2012 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 1StyHp-0007hX-EN for ged-emacs-devel@m.gmane.org; Wed, 25 Jul 2012 11:53:45 +0200 Original-Received: from localhost ([::1]:54935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StyHo-0008Go-QG for ged-emacs-devel@m.gmane.org; Wed, 25 Jul 2012 05:53:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StyHm-0008Ga-Ea for emacs-devel@gnu.org; Wed, 25 Jul 2012 05:53:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StyHg-0000Tx-Nb for emacs-devel@gnu.org; Wed, 25 Jul 2012 05:53:42 -0400 Original-Received: from forward4h.mail.yandex.net ([84.201.186.22]:46134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StyHg-0000T7-BW for emacs-devel@gnu.org; Wed, 25 Jul 2012 05:53:36 -0400 Original-Received: from smtp2h.mail.yandex.net (smtp2h.mail.yandex.net [84.201.187.145]) by forward4h.mail.yandex.net (Yandex) with ESMTP id 987271B21794; Wed, 25 Jul 2012 13:53:34 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1343210014; bh=XnECerwvNMcDKO8pm5W2zX+luzw6QDHhuVBnb3k0RDM=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=hX20bIBlGT+z3c6kMhNSjv9IjGuS++MXHF1CwaSaKALjWQejNvdP3J1I9/wgAQHZ3 j8zP5syb5JHfEvxz0sfRUtBazEkln9vvTPzutNANhsNDuziTiWHloPmJ8CaTwQn6hE dGHodq6OSQsBR6vUsMCe8/CacQRZYw/koybq0Flg= Original-Received: from smtp2h.mail.yandex.net (localhost [127.0.0.1]) by smtp2h.mail.yandex.net (Yandex) with ESMTP id 64F42170006C; Wed, 25 Jul 2012 13:53:34 +0400 (MSK) Original-Received: from 96.gprs.mts.ru (96.gprs.mts.ru [213.87.134.96]) by smtp2h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id rWXW1YMr-rXXu13Ts; Wed, 25 Jul 2012 13:53:34 +0400 X-Yandex-Rcpt-Suid: monnier@IRO.UMontreal.CA X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1343210014; bh=XnECerwvNMcDKO8pm5W2zX+luzw6QDHhuVBnb3k0RDM=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=oMv7efQzoE31awMVYsCbLT7KxzNNq4UhyGt4Szo4+CM3Pmtzbmj/pQFXBx5c+el1Z qVFS0hDN5JIyCJzZ5ujLkGrRhxl60YVNuuw6ABnOlYrtvgvxdVNBPm1eekNESJRtQU LRpbmeQl2U2paeB4a1zkwzbhJlJP5y7Aqq3LICZY= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 84.201.186.22 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:151879 Archived-At: On 07/25/2012 01:59 AM, Stefan Monnier wrote: > What about the overall running time. How much is saved by your patch, > and how much additional is saved by the "decrement consing_since_gc in > free_marker"? Hm. The test is: (defun scroll-benchmark () (interactive) (let ((oldgc gcs-done) (oldtime (float-time))) (condition-case nil (while t (scroll-up) (redisplay)) (error (message "GCs: %d Elapsed time: %f seconds" (- gcs-done oldgc) (- (float-time) oldtime)))))) For xdisp.c, the original results are 600 GCs and 32.65 seconds. When free_cons and free_misc subtracts from consing_since_gc, and save_restriction_restore frees it's data explicitly, results are 560 GCs and 31.95 seconds. Of course, explicit free in save_restriction_restore makes no sense if we fool GC with consing_since_gc: 600 GCs and 32.95 seconds. I don't understand why we're still wast^W^Wspending our time with such a simple and almost obvious thing. Dmitry