Skip to content

Commit

Permalink
bug#61489: Increase BLOCK_ALIGN from 1024 to 32768
Browse files Browse the repository at this point in the history
Originally discovered by Tyler Dodge in his article "Significant Garbage
Collection Improvement For Emacs".

While testing this change on Archlinux system with Intel i5-7200U CPU,
average time of garbage collection gets reduced by ≈25%. Other users
report improvements up to 50%. While monitoring PSS of emacs with and
without customizations loaded before and after the patch, no
statistically significant differences were discovered. So overall, this
change is a win.
* src/alloc.c (BLOCK_ALIGN): increase from 1024 to 32768.
  • Loading branch information
Hi-Angel authored and Eli-Zaretskii committed Mar 4, 2023
1 parent 49e021e commit 396f46d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ lisp_free (void *block)
BLOCK_BYTES and guarantees they are aligned on a BLOCK_ALIGN boundary. */

/* Byte alignment of storage blocks. */
#define BLOCK_ALIGN (1 << 10)
#define BLOCK_ALIGN (1 << 15)
verify (POWER_OF_2 (BLOCK_ALIGN));

/* Use aligned_alloc if it or a simple substitute is available.
Expand Down

0 comments on commit 396f46d

Please sign in to comment.