emacs-devel
[Top][All Lists]
Advanced

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

Re: Remove useless if-before-free and if-before-xfree tests


From: Jim Meyering
Subject: Re: Remove useless if-before-free and if-before-xfree tests
Date: Mon, 29 Jun 2009 10:06:03 +0200

Kim F. Storm wrote:
> Jim Meyering <address@hidden> writes:
>> I removed a bunch of these last year.
>> Since then, a few have snuck back in, so here's another round.
>> I've just committed the following two change sets:
>
> I haven't looked specifically at the changes, but a test before xfree
> may not be useless performance-wise if the normal case is "ptr is NULL".

Hi Kim,

If adding that extra "if" test-before-free leads to a measurable
performance improvement, please let me know.  I've removed hundreds
of such tests in many projects, and so far no one has taken the time
(or been able?) to demonstrate such a thing.

Besides, even if there is a measurable performance difference, in my book,
the cleaner code trumps what can only be a negligible performance hit.




reply via email to

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