[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: VIRT_ADDR_VARIES
From: |
Paul Eggert |
Subject: |
Re: VIRT_ADDR_VARIES |
Date: |
Sun, 06 Nov 2011 17:50:59 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 |
On 11/06/11 09:18, Andreas Schwab wrote:
> Is there any reason not to define VIRT_ADDR_VARIES?
I expect the main reason is performance. For example,
on x86-64 with GCC 4.6.2 -O2, the function:
int pure (Lisp_Object obj) { return PURE_P (obj); }
has 8 instructions (not counting the 'ret') if VIRT_ADDR_VARIES
is defined, and 4 instructions if it is not defined. The key difference
is that VIRT_ADDRESS_VARIES generates this:
cmpq $pure+1000000, %rdi
jge .L2
xorl %eax, %eax
cmpq $pure, %rdi
setge %al
.L2: rep
(where the "1000000" is a function of PURESIZE),
whereas omitting VIRT_ADDRESS_VARIES generates this:
cmpq $my_edata, %rdi
setl %al
> The only difference
> it makes is that the bounds of the pure array are checked accurately
True, but for Emacs it shouldn't matter whether PURE_P checks
accurately or loosely -- either way Emacs should operate correctly.
- VIRT_ADDR_VARIES, Andreas Schwab, 2011/11/06
- Re: VIRT_ADDR_VARIES,
Paul Eggert <=
- Re: VIRT_ADDR_VARIES, Andreas Schwab, 2011/11/07
- Re: VIRT_ADDR_VARIES, Paul Eggert, 2011/11/07
- Re: VIRT_ADDR_VARIES, Andreas Schwab, 2011/11/08
- Re: VIRT_ADDR_VARIES, Paul Eggert, 2011/11/08
- Re: VIRT_ADDR_VARIES, Andreas Schwab, 2011/11/08
- Re: VIRT_ADDR_VARIES, Paul Eggert, 2011/11/08
- Re: VIRT_ADDR_VARIES, Andreas Schwab, 2011/11/08
- Re: VIRT_ADDR_VARIES, Paul Eggert, 2011/11/09
- Re: VIRT_ADDR_VARIES, Andreas Schwab, 2011/11/09
- Re: VIRT_ADDR_VARIES, Paul Eggert, 2011/11/10