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: [Emacs-diffs] trunk r113437: New unwind-protect flavors to better type-check C callbacks. Date: Wed, 24 Jul 2013 10:08:39 -0400 Message-ID: References: <51EE4645.4000904@cs.ucla.edu> <51EF80E6.9020300@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374674953 21578 80.91.229.3 (24 Jul 2013 14:09:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jul 2013 14:09:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 24 16:09:13 2013 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 1V1zkf-0001z0-3N for ged-emacs-devel@m.gmane.org; Wed, 24 Jul 2013 16:09:13 +0200 Original-Received: from localhost ([::1]:53787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1zke-0004EH-IU for ged-emacs-devel@m.gmane.org; Wed, 24 Jul 2013 10:09:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1zkW-0004E0-S7 for emacs-devel@gnu.org; Wed, 24 Jul 2013 10:09:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1zkR-00042p-Sn for emacs-devel@gnu.org; Wed, 24 Jul 2013 10:09:04 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:34604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1zkR-00042S-Nn for emacs-devel@gnu.org; Wed, 24 Jul 2013 10:08:59 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFsoXa8/2dsb2JhbABEDr8AF3OCHgEBBAFWIwULCzQSFBgNJDGHbQbBLY0lg2UDpHqBXoI5WoFL X-IPAS-Result: Av4EABK/CFFsoXa8/2dsb2JhbABEDr8AF3OCHgEBBAFWIwULCzQSFBgNJDGHbQbBLY0lg2UDpHqBXoI5WoFL X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="19692395" Original-Received: from 108-161-118-188.dsl.teksavvy.com (HELO pastel.home) ([108.161.118.188]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jul 2013 10:08:51 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4C21562C9B; Wed, 24 Jul 2013 10:08:39 -0400 (EDT) In-Reply-To: <51EF80E6.9020300@cs.ucla.edu> (Paul Eggert's message of "Wed, 24 Jul 2013 08:23:18 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:162107 Archived-At: > Yes, but the old code had the same problem: make_save_pointer (P) > created an object that could not be safely used if P's storage was > freed at the C level. Oh, that's right. > Certainly any such performance degradation should be swamped by the > other performance improvements inherent to the change, as there's no > longer a need to invoke make_save_pointer, so there's no need to > create and then garbage-collect an object for each of these > record_unwind_protect calls: that's such a win that it should be well > worth possibly losing one branch-predict miss. I'm not sure about "well worth" because AFAIK these make_save_pointer calls were only in non-performance-sensitive areas, whereas unbind_to is used all the time. But I agree that the overall impact is probably small enough. Stefan