GNU bug report logs - #42147
28.0.50; pure vs side-effect-free, missing optimizations?

Previous Next

Package: emacs;

Reported by: Andrea Corallo <andrea_corallo <at> yahoo.it>

Date: Tue, 30 Jun 2020 22:28:02 UTC

Severity: normal

Found in version 28.0.50

Done: Mattias EngdegÄrd <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Andrea Corallo <akrl <at> sdf.org>
Cc: mattiase <at> acm.org, andrea_corallo <at> yahoo.it, Stefan Monnier <monnier <at> iro.umontreal.ca>, Pip Cet <pipcet <at> gmail.com>, 42147 <at> debbugs.gnu.org
Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?
Date: Sun, 5 Jul 2020 16:57:40 -0700
On 7/5/20 3:03 AM, Andrea Corallo wrote:
> Wow I'm really surprised by this result!  Are we doing so much floating
> point while compiling Emacs?

No, and you are right to be skeptical. I checked again, and unfortunately I
originally measured the performance incorrectly, as I used a script that I had
forgotten adds '-march=native' which makes the benchmark results not reflect
what distros normally do (unless one is assuming something like Gentoo which is
far less common).

When I removed -march=native and stuck with just CC='gcc -m32' versus CC='gcc
-m32 -msse2 -mfpmath=sse', the performance difference went the other way on my
AMD Phenom II X4 910e (2010): the version generated with -msse2 -mfpmath=sse was
3.7% slower on the 'make compile-always' benchmark.

I suppose it's possible both of these numbers are artifacts, though I don't know
what would cause the artifacts. At any rate obviously I was wrong to suggest
that -msse2 improves performance on this benchmark. Sorry about the noise.

On 7/5/20 8:07 AM, Stefan Monnier wrote:
> Could it be that your measurements also included the time spent
> compiling C files and that GCC is significantly faster at generating
> code for SSE2?

I do a plain 'make' before running 'cd lisp; make compile-always' so GCC is not
involved; it's mostly an Emacs byte-compiler benchmark.




This bug report was last modified 4 years and 281 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.