• Paul Eggert's avatar
    Tune SAFE_FREE · 76eda952
    Paul Eggert authored
    On my platform (Fedora 28 x86-64, AMD Phenom II X4 910e) this sped
    up a SAFE_FREE-using microbenchmark (string-distance "abc" "abc")
    by about 18%, and shrank the Emacs text size by about 0.1%.
    * src/callint.c (Fcall_interactively):
    * src/callproc.c (call_process):
    * src/doc.c (get_doc_string, Fsnarf_documentation):
    * src/editfns.c (Freplace_buffer_contents):
    * src/emacs-module.c (funcall_module):
    * src/eval.c (Flet):
    * src/process.c (Fmake_process):
    * src/term.c (tty_menu_show):
    * src/xdisp.c (safe__call):
    * src/xmenu.c (x_menu_show):
    * src/data.c (wrong_choice): No need to call SAFE_FREE here.
    * src/lisp.h (USE_SAFE_ALLOCA):
    * src/regex.c (REGEX_USE_SAFE_ALLOCA):
    Do not declare sa_must_free local; no longer needed.
    All uses removed.
    (SAFE_FREE): Rewrite in terms of safe_free.
    (safe_free): New function, optimized to use xfree.
    (SAFE_FREE_UNBIND_TO): New macro.
    (safe_free_unbind_to): New function.
editfns.c 173 KB