* Emacs 28.1 built with x32 ABI outperforms x86-64
@ 2022-04-08 16:50 Sven Hartrumpf
2022-04-08 17:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 3+ messages in thread
From: Sven Hartrumpf @ 2022-04-08 16:50 UTC (permalink / raw)
To: help-gnu-emacs
Dear Emacs users.
With the new release of Emacs, I tried to build it with the x32 ABI.
I succeeded for the first time (gave up with earlier OS versions) and
it even worked without any problems (Ubuntu 21.10, gcc 11.2).
A small benchmark ("make check" followed by reproducing all .elc files)
outperforms the equivalent x86-64 version by 8 %.
Memory usage is almost half of x86-64, when opening files of several 100 MB.
Limitations:
- x32 has a hard memory limit of 4 GB.
- To avoid building too many dependencies for x32, I used the following
configure line: ./configure --with-sound=no --without-dbus --without-x
- I had to build 12 x32 versions:
gnutls autoconf ncurses nettle libidn2 libtasn1 p11-kit libgmp libtool libffi guile-2.2 gc
(Ask me if you need more details.)
Greetings
Sven
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Emacs 28.1 built with x32 ABI outperforms x86-64
2022-04-08 16:50 Emacs 28.1 built with x32 ABI outperforms x86-64 Sven Hartrumpf
@ 2022-04-08 17:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-04-10 6:02 ` Sven Hartrumpf
0 siblings, 1 reply; 3+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-04-08 17:17 UTC (permalink / raw)
To: help-gnu-emacs
Sven Hartrumpf wrote:
> With the new release of Emacs, I tried to build it with the
> x32 ABI. I succeeded for the first time (gave up with
> earlier OS versions) and it even worked without any problems
> (Ubuntu 21.10, gcc 11.2).
>
> A small benchmark ("make check" followed by reproducing all
> .elc files) outperforms the equivalent x86-64 version by 8
> %. Memory usage is almost half of x86-64, when opening files
> of several 100 MB.
>
> Limitations:
> - x32 has a hard memory limit of 4 GB.
> - To avoid building too many dependencies for x32, I used the following
> configure line: ./configure --with-sound=no --without-dbus --without-x
> - I had to build 12 x32 versions:
> gnutls autoconf ncurses nettle libidn2 libtasn1 p11-kit
> libgmp libtool libffi guile-2.2 gc
> (Ask me if you need more details.)
Yes, can you post the script (or function) that carried out
the experiment?
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Emacs 28.1 built with x32 ABI outperforms x86-64
2022-04-08 17:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-04-10 6:02 ` Sven Hartrumpf
0 siblings, 0 replies; 3+ messages in thread
From: Sven Hartrumpf @ 2022-04-10 6:02 UTC (permalink / raw)
To: help-gnu-emacs
Hello.
Emanuel wrote, 2022-04-08 19:17:
> Sven wrote:
> Yes, can you post the script (or function) that carried out
> the experiment?
Sure, see below.
Some notes:
- gccx32 is a tiny script that calls gcc in x32 mode
(just passing CFLAGS to configure does not work as expected), containing:
gcc-11 -mx32 -I/usr/local/include/x86_64-linux-gnux32 -I/usr/x86_64-linux-gnux32/include "$@"
- dropcaches-root is s tool that avoids filesystem cache effects, simlar to a:
echo 3 > /proc/sys/vm/drop_caches
- I call the script emacs.install as follows:
emacs.install x86-64 |& tee emacs.64
emacs.install x32 |& tee emacs.x32
To test the second line, you will need all the x32 builds that I mentioned in my first mail.
--- emacs.install
#!/bin/bash
set -e -u -x
ABI=$1
tar xf emacs-28.1.tar.gz
cd emacs-28.1
if [ "$ABI" == "x32" ] ; then
CC=gccx32 ./configure --prefix=/usr/local --bindir=/usr/local/binx32 --includedir=/usr/local/includex32 --libdir=/usr/local/libx32 --with-sound=no --without-dbus --without-x
else # normal 64 bit
CC=gcc-11 ./configure --prefix=/usr/local --bindir=/usr/local/bin64 --libdir=/usr/local/lib64 --with-sound=no --without-dbus --without-x
fi
make -j4
strip src/emacs
dropcaches-root
date -Is
make check
find lisp -name '*.elc' | grep -v -e '/c-by.elc$' -e 'bindat.elc' | xargs rm # grep to avoid 2 files where compilation fails with max-lisp-eval-depth error
date -Is
make
date -Is
---
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-10 6:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-08 16:50 Emacs 28.1 built with x32 ABI outperforms x86-64 Sven Hartrumpf
2022-04-08 17:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-04-10 6:02 ` Sven Hartrumpf
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.