unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: 23019@debbugs.gnu.org
Subject: bug#23019: parse-partial-sexp doesn't output the full state needed for its continuance.
Date: Fri, 18 Mar 2016 15:40:34 -0400	[thread overview]
Message-ID: <jwvio0j60if.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <20160318191633.GC9433@acm.fritz.box> (Alan Mackenzie's message of "Fri, 18 Mar 2016 19:16:33 +0000")

> I didn't give all that much thought to it.  With a "local" state,
> state.field will be addressed as a constant offset from the stack frame
> base register.  With a "remote" state, state->field will be addressed as
> a constant offset from some address register.  Provided the processor
> has enough registers available, it shouldn't make a difference.  But on
> an architecture with a restricted set of registers (?old 80x86), it might
> make things slower if an address register needs to be repeatedly loaded,
> or even repeatedly stacked around function calls.

That was my first reaction as well.  But my other self was telling me "I
can't say why, but my gut feeling says that this code is "cleaner"
and should hence be easier to optimize".

> So, at least on my machine, the "indirect" version is faster, by
> around 1%.  Not a great difference, but I'm surprised by the way
> it went.

Thanks for the test.  As expected, it's a wash, but it's good to confirm
that the cleaner version is at least no slower,


        Stefan





      reply	other threads:[~2016-03-18 19:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15  9:13 bug#23019: parse-partial-sexp doesn't output the full state needed for its continuance Alan Mackenzie
2016-03-15  9:35 ` Andreas Röhler
2016-03-15 10:15   ` Alan Mackenzie
2016-03-15 13:38     ` Andreas Röhler
2016-03-17 12:58 ` Stefan Monnier
2016-03-17 21:49   ` Alan Mackenzie
2016-03-18  4:49     ` Stefan Monnier
2016-03-18 15:11       ` Alan Mackenzie
2016-03-18 15:22         ` Alan Mackenzie
2016-03-18 16:23         ` Stefan Monnier
2016-03-18 18:25           ` Alan Mackenzie
2016-03-18 19:36             ` Stefan Monnier
2016-03-19 17:06               ` Alan Mackenzie
2016-03-20  1:30                 ` Stefan Monnier
2016-03-20 13:41                   ` Alan Mackenzie
2016-04-03 22:53                   ` John Wiegley
2016-04-04 12:15                     ` Stefan Monnier
2016-04-05 12:54                     ` Alan Mackenzie
2016-04-05 13:50                       ` Stefan Monnier
2016-04-05 14:44                         ` Alan Mackenzie
2016-03-18 16:27     ` Stefan Monnier
2016-03-18 19:16       ` Alan Mackenzie
2016-03-18 19:40         ` Stefan Monnier [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwvio0j60if.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=23019@debbugs.gnu.org \
    --cc=acm@muc.de \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).