aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorKonstantin Kharlamov2023-02-16 18:07:55 +0300
committerEli Zaretskii2023-03-04 13:25:34 +0200
commit396f46d904ab7509476b0d824ec2e4d9a231a2df (patch)
treeb5d008d7acaaa6202b7a8a9831ca76740f049abd /src/alloc.c
parent49e021e5be943477329b065fbff76862ea832acc (diff)
downloademacs-396f46d904ab7509476b0d824ec2e4d9a231a2df.tar.gz
emacs-396f46d904ab7509476b0d824ec2e4d9a231a2df.zip
bug#61489: Increase BLOCK_ALIGN from 1024 to 32768
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.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 6a7037b6bb0..5450586b533 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1083,7 +1083,7 @@ lisp_free (void *block)
1083 BLOCK_BYTES and guarantees they are aligned on a BLOCK_ALIGN boundary. */ 1083 BLOCK_BYTES and guarantees they are aligned on a BLOCK_ALIGN boundary. */
1084 1084
1085/* Byte alignment of storage blocks. */ 1085/* Byte alignment of storage blocks. */
1086#define BLOCK_ALIGN (1 << 10) 1086#define BLOCK_ALIGN (1 << 15)
1087verify (POWER_OF_2 (BLOCK_ALIGN)); 1087verify (POWER_OF_2 (BLOCK_ALIGN));
1088 1088
1089/* Use aligned_alloc if it or a simple substitute is available. 1089/* Use aligned_alloc if it or a simple substitute is available.