From: Paul Eggert <eggert@cs.ucla.edu>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: emacs-devel@gnu.org
Subject: Re: VIRT_ADDR_VARIES
Date: Mon, 07 Nov 2011 15:23:16 -0800 [thread overview]
Message-ID: <4EB86864.5080709@cs.ucla.edu> (raw)
In-Reply-To: <m3d3d4mins.fsf@hase.home>
On 11/07/11 00:38, Andreas Schwab wrote:
> Paul Eggert <eggert@cs.ucla.edu> writes:
>> I expect the main reason is performance.
>
> How much of it matters?
Compiling without VIRT_ADDR_VARIES speeds up aset by 44% on my host
(Fedora 15 x86-64, GCC 4.6.2, AMD Phenom II X4 910e).
Benchmark code is shown below; I ran (benchmark 100000000)
five times on the byte-compiled version of this code,
and took the median.
>> for Emacs it shouldn't matter whether PURE_P checks
>> accurately or loosely -- either way Emacs should operate correctly.
>
> Which it doesn't.
Sorry, I don't know the context. What's the bug here?
If Emacs doesn't define VIRT_ADDR_VARIES when it should,
then that can cause bugs -- is that the issue?
Here's the benchmark code.
(defun benchmark-with-aset (n)
(let ((start (float-time (get-internal-run-time)))
(v (make-vector 1 0))
(i 0))
(while (< i n)
(aset v 0 1)
(setq i (1+ i)))
(- (float-time (get-internal-run-time)) start)))
(defun benchmark-without-aset (n)
(let ((start (float-time (get-internal-run-time)))
(v (make-vector 1 0))
(i 0))
(while (< i n)
(setq i (1+ i)))
(- (float-time (get-internal-run-time)) start)))
(defun benchmark (n)
(- (benchmark-with-aset n)
(benchmark-without-aset n)))
next prev parent reply other threads:[~2011-11-07 23:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 17:18 VIRT_ADDR_VARIES Andreas Schwab
2011-11-07 1:50 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-07 8:38 ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-07 23:23 ` Paul Eggert [this message]
2011-11-08 8:56 ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-08 17:34 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-08 18:38 ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-08 21:17 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-08 22:06 ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-09 17:44 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-09 21:32 ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-10 8:17 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-10 9:29 ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-10 16:19 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-10 11:06 ` VIRT_ADDR_VARIES Eli Zaretskii
2011-11-10 11:20 ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-10 16:29 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-10 16:43 ` VIRT_ADDR_VARIES Eli Zaretskii
2011-11-10 16:50 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-10 18:06 ` VIRT_ADDR_VARIES Eli Zaretskii
2011-11-14 4:57 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-10 4:05 ` VIRT_ADDR_VARIES Stephen J. Turnbull
2011-11-10 5:40 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-10 17:05 ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-10 17:15 ` VIRT_ADDR_VARIES Paul Eggert
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=4EB86864.5080709@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=schwab@linux-m68k.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 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).