all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Daniel Colascione <dancol@dancol.org>
Cc: Philipp Stephani <p.stephani2@gmail.com>,
	Paul Eggert <eggert@cs.ucla.edu>,
	emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] emacs-25 3eb93c0: Rely on conservative stack scanning to find "emacs_value"s
Date: Thu, 31 Mar 2016 17:29:07 -0400	[thread overview]
Message-ID: <jwvpoua4a10.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <56FD796B.4000703@dancol.org> (Daniel Colascione's message of "Thu, 31 Mar 2016 12:24:27 -0700")

> That's cheap: you can do it with linear allocation out of an array.
> Why would that be expensive?

That's very expensive compared to doing nothing.

It means that you have to allocate a new array, loop through the old one
calling your "cheap allocation" function on each element, instead of
just passing the array pointer untouched.

Of course, the advantage of your scheme is that you get to do manual
memory management, with the endless hours of fun that entails.

"There's worse, but it's more expensive!"


        Stefan



  reply	other threads:[~2016-03-31 21:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151130193446.22218.14685@vcs.savannah.gnu.org>
     [not found] ` <E1a3UDm-0005my-HI@vcs.savannah.gnu.org>
2016-01-03 13:59   ` [Emacs-diffs] emacs-25 3eb93c0: Rely on conservative stack scanning to find "emacs_value"s Daniel Colascione
2016-01-03 15:45     ` Paul Eggert
2016-03-29 10:07       ` Philipp Stephani
2016-03-29 12:59         ` Stefan Monnier
2016-03-30  1:35         ` Paul Eggert
2016-03-30 18:26           ` Philipp Stephani
2016-03-30 18:28             ` Daniel Colascione
2016-03-30 18:42             ` Paul Eggert
2016-03-30 18:48               ` Daniel Colascione
2016-03-30 21:13             ` Stefan Monnier
2016-03-30 21:18               ` Daniel Colascione
2016-03-30 21:30                 ` Stefan Monnier
2016-03-31 18:46                   ` Philipp Stephani
2016-03-31 19:24                   ` Daniel Colascione
2016-03-31 21:29                     ` Stefan Monnier [this message]
2016-04-01 18:34                       ` Daniel Colascione
2016-04-01 19:05                         ` Stefan Monnier
2016-04-01 19:15                           ` Daniel Colascione
2016-04-01 22:46                             ` Stefan Monnier
2016-04-03  1:11                               ` Daniel Colascione
2016-04-03  5:49                                 ` Stefan Monnier

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=jwvpoua4a10.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dancol@dancol.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=p.stephani2@gmail.com \
    /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.