bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory


From: Kévin Le Gouguec
Subject: bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory
Date: Mon, 11 May 2020 22:47:33 +0200

As detailed in bug#41077, I compiled the feature/native-comp branch[1]
on a low-end-ish laptop[2], blacklisting char-fold.el since native
compilation took too much memory for this file.

As reported there, I get appreciable speedups on the benchmarks
distributed in the elisp-benchmarks ELPA package, except for one
specific test: fibn.  When native-compiled (with any value of
comp-speed), this test makes Emacs abort with the message:

> Memory exhausted--use C-x s then exit and restart Emacs

I've plotted some graphs showing fibn's memory consumption for every
value of comp-speed, as well as for emacs master[3] (where all 3
iterations run to completion):

Attachment: fibn.pdf
Description: Adobe PDF document

See [4] for the methodology, source material and logs.  Out of curiosity
I've disassembled the compiled functions in fibn.el for comp-speed 2;
I'm not fluent enough in assembly to spot anything obviously wrong[5].


Let me know if there are things you would like me to try out in order to
investigate this.  


[1] Commit 92cf4bb8cc3da81f4877a734b9e9089ac4b89e85.

[2] Samsung NC10, 2GB RAM, 2GB HDD swap, on Debian Buster.

[3] Commit 9d8fc3a598090da518fcdd5c0503ed0f7faa41a9.

[4] .eln files compiled with:

    (dotimes (i 4) (rename-file (let ((comp-speed i)) (native-compile 
"fibn.el"))
                                (format "fibn-%d.eln" i)))

    Script used to collect measurements on branch native-comp:

Attachment: repro.sh
Description: application/shellscript

    Script used to collect measurements on branch master:

Attachment: master.sh
Description: application/shellscript

    Script used to plot the graphs:

Attachment: plot.py
Description: Text Data

    Measurements:

Attachment: measurements.tgz
Description: application/compressed-tar

    Logs for native-comp:

Attachment: repro.log
Description: Text Data

    Logs for master:

Attachment: master.log
Description: Text Data

[5]

Attachment: elb-fibn.s
Description: Text Data

Attachment: elb-fibn-entry.s
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]