[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How and when to use GCPRO?
From: |
Stefan Monnier |
Subject: |
Re: How and when to use GCPRO? |
Date: |
Mon, 27 Dec 2010 21:17:42 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>>>> Actually, both Fcar and Fcdr can GC (by signalling an error which
>>>> triggers the debugger).
>>> But the debugger will not return.
>> Oh, right,
> Discussions like this worry me. What if the function is later changed to
> call something that can GC? What if it's used in some new context? If
> it's not utterly performance-critical code, isn't it better to be safe
> than sorry and GCPRO anyway? It's not as if it's an expensive operation.
> Premature optimization is the root of all evil, after all.
On most platforms, GCPRO is a no-op, and on those where it's not, it's
never been a major performance issue, AFAIK. The problem is just that
it makes the code that much more verbose and painful to
write/read/maintain.
Stefan
- How and when to use GCPRO?, Leo, 2010/12/27
- Re: How and when to use GCPRO?, Andreas Schwab, 2010/12/27
- Re: How and when to use GCPRO?, Leo, 2010/12/27
- Re: How and when to use GCPRO?, Stefan Monnier, 2010/12/27
- Re: How and when to use GCPRO?, Andreas Schwab, 2010/12/27
- Re: How and when to use GCPRO?, Stefan Monnier, 2010/12/27
- Re: How and when to use GCPRO?, Daniel Colascione, 2010/12/27
- Re: How and when to use GCPRO?,
Stefan Monnier <=
- Re: How and when to use GCPRO?, Daniel Colascione, 2010/12/27
- Re: How and when to use GCPRO?, Stefan Monnier, 2010/12/27
- Conservative scanning (was: Re: How and when to use GCPRO?), Daniel Colascione, 2010/12/27
- Re: How and when to use GCPRO?, Richard Stallman, 2010/12/28
- Re: How and when to use GCPRO?, Leo, 2010/12/27
- Common Lisp like feature expressions (was: How and when to use GCPRO?), Leo, 2010/12/27
- Re: Common Lisp like feature expressions (was: How and when to use GCPRO?), Andreas Schwab, 2010/12/27
- Re: Common Lisp like feature expressions (was: How and when to use GCPRO?), Leo, 2010/12/27
- Re: Common Lisp like feature expressions, Stefan Monnier, 2010/12/27
- Re: Common Lisp like feature expressions, Leo, 2010/12/28