summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2010-11-09 20:20:12 -0600
committerCraig A. Berry <craigberry@mac.com>2010-11-09 22:09:42 -0600
commita3cbd8d01434fbac731fd3f88a8fc77b020787e1 (patch)
treebbe8104d32cc7911d1b805f53f5a44af842d1665 /perlio.c
parente198ad16b8e9d759aac5600f4a4964317fd90b90 (diff)
downloadperl-a3cbd8d01434fbac731fd3f88a8fc77b020787e1.tar.gz
Make the buffer size for the perlio layer a macro.
The 4K buffer size was chosen way back in bb9950b. Significant performance improvements are seen with larger buffer sizes, though the optimum size likely varies by architecture and workload. For starters, we'll leave the default as-is but make the buffer size a macro and thus user-configurable via: sh Configure -Accflags=-DPERLIO_BUFSIZ=<number> Choosing a better (larger) default is still TODO.
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/perlio.c b/perlio.c
index 4073c97b54..5b396793e0 100644
--- a/perlio.c
+++ b/perlio.c
@@ -4120,7 +4120,7 @@ PerlIOBuf_get_base(pTHX_ PerlIO *f)
if (!b->buf) {
if (!b->bufsiz)
- b->bufsiz = 4096;
+ b->bufsiz = PERLIO_BUFSIZ;
Newxz(b->buf,b->bufsiz, STDCHAR);
if (!b->buf) {
b->buf = (STDCHAR *) & b->oneword;