Again, thank you Jerry!
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1390241595 0
# Node ID 7277cf461612be80403c68d3368a5b3329210e3d
# Parent 0853e1ec8529b0b7d50abe5ffdadaaee54c3d9b4
Use an explicit hexadecimal constant for READ_BUF_SIZE, correct ChangeLog.
2014-01-20 Aidan Kehoe <kehoea(a)parhasard.net>
(READ_BUF_SIZE): Use an explicit hexadecimal constant for the
0x20000 value for this, don't left-shift 2 16 times. Correct the
last ChangeLog entry after Jerry James pointed out a mistake on my
part. Thank you for review and discussion, Jerry and Stephen
diff -r 0853e1ec8529 -r 7277cf461612 src/ChangeLog
--- a/src/ChangeLog Mon Jan 20 17:53:07 2014 +0000
+++ b/src/ChangeLog Mon Jan 20 18:13:15 2014 +0000
＠＠ -6,14 +6,19 ＠＠
these two functions, but does mean that decisions about alloca
vs. malloc based on buffer size are made in the same place
(ultimately, the ALLOCA() macro).
+ (READ_BUF_SIZE): Use an explicit hexadecimal constant for the
+ 0x20000 value for this, don't left-shift 2 16 times. Correct the
+ last ChangeLog entry after Jerry James pointed out a mistake on my
+ part. Thank you for review and discussion, Jerry and Stephen
2014-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
* fileio.c (READ_BUF_SIZE):
Stack sizes > 2**16 elicited bugs back in August 1996, but there's
nothing to indicate this is still the case. GNU uses a block size
- of #x10000, and that size works better with the coding system
- buffering, improving performance there; move to this value.
+ of #x10000 without problems, we can afford to be a bit more
+ adventurous with a value of #x20000.
Use it in #'copy-file too, move its #define earlier to make that
possible. Not relevant to the coding system buffering, but still
diff -r 0853e1ec8529 -r 7277cf461612 src/fileio.c
--- a/src/fileio.c Mon Jan 20 17:53:07 2014 +0000
+++ b/src/fileio.c Mon Jan 20 18:13:15 2014 +0000
＠＠ -1786,7 +1786,7 ＠＠
-#define READ_BUF_SIZE (2 << 16)
+#define READ_BUF_SIZE 0x20000
DEFUN ("copy-file", Fcopy_file, 2, 4,
"fCopy file: \nFCopy %s to file: \np\nP", /*
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
XEmacs-Patches mailing list