all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Meyering <jim@meyering.net>
To: storm@cua.dk (Kim F. Storm)
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: Remove useless if-before-free and if-before-xfree tests
Date: Mon, 29 Jun 2009 10:06:03 +0200	[thread overview]
Message-ID: <87fxdjtqfo.fsf@meyering.net> (raw)
In-Reply-To: <87r5x3lbo6.fsf@kfs-lx.rd.rdm> (Kim F. Storm's message of "Mon, 29 Jun 2009 09:52:09 +0200")

Kim F. Storm wrote:
> Jim Meyering <jim@meyering.net> 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	other threads:[~2009-06-29  8:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-29  5:30 Remove useless if-before-free and if-before-xfree tests Jim Meyering
2009-06-29  7:52 ` Kim F. Storm
2009-06-29  8:06   ` Jim Meyering [this message]
2009-06-29 23:43     ` Stephen J. Turnbull

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fxdjtqfo.fsf@meyering.net \
    --to=jim@meyering.net \
    --cc=emacs-devel@gnu.org \
    --cc=storm@cua.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.