Changeset 12360


Ignore:
Timestamp:
01/11/10 19:23:45 (11 years ago)
Author:
ehuelsmann
Message:

Set initial ByteArrayOutputStream? buffer to 2048; the default 32 way to small.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/ByteArrayOutputStream.java

    r12288 r12360  
    4848    {
    4949        this.elementType = elementType;
    50         initAsBinaryOutputStream(byteArrayOutputStream = new java.io.ByteArrayOutputStream());
     50        initAsBinaryOutputStream(byteArrayOutputStream = new java.io.ByteArrayOutputStream(2048));
     51        // based on statistics of ABCL's own .cls files
     52        // as per 20100111, 2048 is the 70th percentile,
     53        // meaning that only 30% of all .cls files is bigger
     54
     55        // However, *every* .cls file is bigger than 32 bytes;
     56        // we want to prevent buffer resizing
    5157    }
    5258
Note: See TracChangeset for help on using the changeset viewer.