[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61490: [PATCH v2] Increase BLOCK_ALIGN from 1024 to 32768
From: |
Konstantin Kharlamov |
Subject: |
bug#61490: [PATCH v2] Increase BLOCK_ALIGN from 1024 to 32768 |
Date: |
Thu, 16 Feb 2023 18:05:09 +0300 |
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
---
v2:
* Richard Stallman: don't use non-ASCII in the description
* Me: mention the report by Ihor Radchenko where performance
improved by 50%
src/alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/alloc.c b/src/alloc.c
index c25e81d1dde..d278b01343d 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -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.
--
2.39.2
- bug#61489: Acknowledgement ([PATCH 1/1] Increase BLOCK_ALIGN from 2¹⁰to 2¹⁵), (continued)
bug#61489: [PATCH 1/1] Increase BLOCK_ALIGN from 2¹⁰to 2¹⁵, Ihor Radchenko, 2023/02/13
bug#61489: [PATCH v2] Increase BLOCK_ALIGN from 1024 to 32768, Konstantin Kharlamov, 2023/02/16
Message not available
bug#61490: [PATCH 0/1] Increase BLOCK_ALIGN from 2¹â°to 2¹âµ, Richard Stallman, 2023/02/16
bug#61490: [PATCH v2] Increase BLOCK_ALIGN from 1024 to 32768,
Konstantin Kharlamov <=