[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] trunk r113437: New unwind-protect flavors to better ty

From: Stefan Monnier
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]