all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: max-lisp-eval-depth
Date: Fri, 01 Feb 2013 15:46:38 -0500	[thread overview]
Message-ID: <jwv38xfpy41.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: 87a9rpcil5.fsf@gavenkoa.example.com

> Please answer why *Byte-compiled code uses much less stack space*?

Simple because every `progn' or `if' nesting adds to the stack
space usage in interpreted code, but not in byte-compiled code.

Similarly for `let', interpreted code will end up pushing the new
binding on the "specpdl stack" and then doing a recursive C call to the
Feval function, whereas byte-compiled code will only push the new value
onto the "specpdl stack" but will stay within the same function.

> Very briefly, with few tech details. Which ratio between compiled and
> non-compiled usage?

That varies a lot depending on the kind of code.
I'd guess on the average a factor of 4, maybe?


        Stefan "Note that there are different notions of stack space at
                play here, such as the one measured by
                max-lisp-eval-depth, the one measuring the size of the
                C stack, the once measured by max-specpdl-size, ..."




  reply	other threads:[~2013-02-01 20:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.18654.1359574929.855.help-gnu-emacs@gnu.org>
2013-01-30 22:01 ` max-lisp-eval-depth Stefan Monnier
2013-01-31  3:08   ` max-lisp-eval-depth drain
     [not found]   ` <mailman.18689.1359601697.855.help-gnu-emacs@gnu.org>
2013-01-31 14:54     ` max-lisp-eval-depth jack-mac
2013-01-31 15:04       ` max-lisp-eval-depth Ludwig, Mark
2013-01-31 17:33         ` max-lisp-eval-depth drain
2013-01-31 18:28   ` max-lisp-eval-depth Oleksandr Gavenko
2013-02-01 20:46     ` Stefan Monnier [this message]
2013-02-02 19:25       ` max-lisp-eval-depth drain
2013-02-02 19:27         ` max-lisp-eval-depth Drew Adams
2013-02-03  4:53           ` max-lisp-eval-depth drain
2013-01-30 19:42 max-lisp-eval-depth drain
2013-01-30 20:00 ` max-lisp-eval-depth Perry Smith
2013-01-30 21:27   ` max-lisp-eval-depth Drew Adams
2013-01-30 22:00     ` max-lisp-eval-depth drain

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=jwv38xfpy41.fsf-monnier+gmane.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /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.