File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ impl Tables {
6262 }
6363 let mut table16 = [ 0 , ..1 << 16 ] ;
6464 for ( i, v) in table16. iter_mut ( ) . enumerate ( ) {
65- // assume little endian
6665 * v = table8[ i & 255 ] as u16 << 8 |
6766 table8[ i >> 8 ] as u16 ;
6867 }
@@ -104,9 +103,10 @@ impl Tables {
104103
105104/// Reads all remaining bytes from the stream.
106105fn read_to_end < R : Reader > ( r : & mut R ) -> IoResult < Vec < u8 > > {
107- // FIXME: this method is a temporary workaround for jemalloc on
108- // linux. Replace it with Reader::read_to_end() once the jemalloc
109- // issue has been fixed.
106+ // As reading the input stream in memory is a bottleneck, we tune
107+ // Reader::read_to_end() with a fast growing policy to limit
108+ // recopies. If MREMAP_RETAIN is implemented in the linux kernel
109+ // and jemalloc use it, this trick will become useless.
110110 const CHUNK : uint = 64 * 1024 ;
111111
112112 let mut vec = Vec :: with_capacity ( CHUNK ) ;
You can’t perform that action at this time.
0 commit comments