From: Paul Eggert <eggert@cs.ucla.edu>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: Lisp_Marker size on 32bit systems
Date: Fri, 7 Sep 2018 20:04:52 -0700 [thread overview]
Message-ID: <499c51c7-37c0-0b4f-442c-8f83f1574523@cs.ucla.edu> (raw)
In-Reply-To: <jwvva7gpy18.fsf-monnier+emacs@gnu.org>
Stefan Monnier wrote:
> I think 32 byte objects aren't supposed to be much more likely to be
> aligned on 32 byte boundaries than on 32B + 16B.
True, I miscalculated. If the cache line size is 64 bytes and objects are
allocated on 16-byte boundaries (the case now), the probability that a
randomly-placed 24-byte marker (allocated as 32 bytes) will straddle into two
cache lines is (2-1)/4, or 25%. Whereas if objects are allocated in 8-byte
boundaries as you're suggesting, the probability that the same marker will
straddle is (3-1)/8, which is still 25%. So for this particular case the
straddling issue should be a wash.
> Those perf-stats also show improved I$ performance, which isn't
> explained by your suggested explanation. Similarly, they show a reduced
> number of instructions.
Yes, it could well be that the 32-byte allocation is faster than the 24 partly
due to some reason other than d-cache effects. Although there is a smaller
percentage of cache misses in the 32-byte version, it could be that this is
because the 32-byte version uses simpler code that would be faster even if the
cache miss rate were the same.
next prev parent reply other threads:[~2018-09-08 3:04 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 0:41 Lisp_Marker size on 32bit systems Stefan Monnier
2018-09-06 6:51 ` Paul Eggert
2018-09-06 12:17 ` Stefan Monnier
2018-09-07 7:15 ` Paul Eggert
2018-09-07 8:05 ` Eli Zaretskii
2018-09-07 13:45 ` Paul Eggert
2018-09-07 14:12 ` GDB and compiler-operations (was: Lisp_Marker size on 32bit systems) Stefan Monnier
2018-09-07 14:23 ` Eli Zaretskii
2018-09-07 15:16 ` GDB and compiler-operations Andreas Schwab
2018-09-07 15:48 ` GDB and compiler-operations (was: Lisp_Marker size on 32bit systems) Paul Eggert
2018-09-07 15:58 ` GDB and compiler-operations Stefan Monnier
2018-09-07 17:11 ` Eli Zaretskii
2018-09-07 17:15 ` Paul Eggert
2018-09-07 19:59 ` Tom Tromey
2018-09-07 14:19 ` Lisp_Marker size on 32bit systems Eli Zaretskii
2018-09-07 16:27 ` Paul Eggert
2018-09-07 17:16 ` Eli Zaretskii
2018-09-07 18:13 ` Paul Eggert
2018-09-07 18:32 ` Eli Zaretskii
2018-09-07 19:05 ` Paul Eggert
2018-09-07 19:22 ` Eli Zaretskii
2018-09-07 12:16 ` Stefan Monnier
2018-09-07 19:04 ` Paul Eggert
2018-09-07 19:45 ` Stefan Monnier
2018-09-07 21:03 ` Paul Eggert
2018-09-08 1:54 ` Stefan Monnier
2018-09-08 3:04 ` Paul Eggert [this message]
2018-09-08 3:10 ` 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=499c51c7-37c0-0b4f-442c-8f83f1574523@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/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.