Skip to content

Commit 7017fb0

Browse files
committed
rephrase some comments according to remarks in the PR
1 parent 7c6a4cc commit 7017fb0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/bench/shootout-reverse-complement.rs

+4-4
Original file line numberDiff line numberDiff 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.
106105
fn 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);

0 commit comments

Comments
 (0)