[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: --with-wide-int
From: |
Paul Eggert |
Subject: |
Re: --with-wide-int |
Date: |
Sun, 27 Nov 2011 23:56:29 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 |
On 11/27/11 20:19, Stefan Monnier wrote:
> So I expect the practical limit to be closer to 1GB.
In practice the limit is a bit less than 2 GiB if you're editing
one big file. (I observed this just now, on Ubuntu 11.10 x86,
by editing a 1947957328-byte text file.)
Simple edits and incremental searches are fast; more
complicated stuff can be slow (as is reading or writing
the entire file to disk), but this is no different from
a 64-bit host.
Emacs's use of ptrdiff_t imposes a hard limit of just
under 2 GiB on a 32-bit host. The OS may impose its own
limit but it's not uncommon for it to behave like Ubuntu.
If you want to edit many large files, of course, you're
out of luck, as the limit is at most ~ 4 GiB virtual memory
total and you'll suffer from fragmentation anyway.
Still, it's useful to be able to edit one ~ 2 GiB file
in Emacs, as opposed to being stuck with a limit
of ~ 500 MiB for that file.
--with-wide-int is not simply about having bigger buffers.
It's also about having bigger integers, which is a win in
some important cases. GNU Calc runs a lot faster,
for example. On this benchmark:
(load-library "calc")
(load-library "calc-ext")
(load-library "benchmark")
(calc-working 0)
(benchmark-run 1 (math-numdigs (math-pow 2 (math-pow 2 16))))
Emacs is 3.9x faster on my Ubuntu 11.10 x86 host
when it is configured --with-wide-int (6.601589 seconds
normally, and 1.676254 seconds --with-wide-int).
- immediate strings, Dmitry Antipov, 2011/11/25
- Re: immediate strings, Andreas Schwab, 2011/11/26
- Re: immediate strings, Paul Eggert, 2011/11/26
- Re: immediate strings, Eli Zaretskii, 2011/11/26
- Re: immediate strings, Dmitry Antipov, 2011/11/26
- Re: immediate strings, Paul Eggert, 2011/11/26
- --with-wide-int, Stefan Monnier, 2011/11/27
- Re: --with-wide-int,
Paul Eggert <=
- Re: --with-wide-int, Stefan Monnier, 2011/11/28
- Re: --with-wide-int, Dan Nicolaescu, 2011/11/28
- Re: --with-wide-int, Eli Zaretskii, 2011/11/28
- Re: --with-wide-int, Stefan Monnier, 2011/11/28
- Re: --with-wide-int, Stephen J. Turnbull, 2011/11/28
- Re: --with-wide-int, Paul Eggert, 2011/11/29