about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Pinot <texitoi@texitoi.eu>2014-10-27 17:24:10 +0100
committerGuillaume Pinot <texitoi@texitoi.eu>2014-10-28 22:14:05 +0100
commit7017fb095b8f5b4cf7b057c9add062da5994e4b6 (patch)
treeb2ecf94080ad77f80724430a17e2ec57b1495405
parent7c6a4cc98be6e8091054e84bd095fcb0d5e0e8e7 (diff)
downloadrust-7017fb095b8f5b4cf7b057c9add062da5994e4b6.tar.gz
rust-7017fb095b8f5b4cf7b057c9add062da5994e4b6.zip
rephrase some comments according to remarks in the PR
-rw-r--r--src/test/bench/shootout-reverse-complement.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/bench/shootout-reverse-complement.rs b/src/test/bench/shootout-reverse-complement.rs
index fc7ba2e4369..5ce1b2fc40d 100644
--- a/src/test/bench/shootout-reverse-complement.rs
+++ b/src/test/bench/shootout-reverse-complement.rs
@@ -62,7 +62,6 @@ impl Tables {
         }
         let mut table16 = [0, ..1 << 16];
         for (i, v) in table16.iter_mut().enumerate() {
-            // assume little endian
             *v = table8[i & 255] as u16 << 8 |
                  table8[i >> 8]  as u16;
         }
@@ -104,9 +103,10 @@ impl Tables {
 
 /// Reads all remaining bytes from the stream.
 fn read_to_end<R: Reader>(r: &mut R) -> IoResult<Vec<u8>> {
-    // FIXME: this method is a temporary workaround for jemalloc on
-    // linux.  Replace it with Reader::read_to_end() once the jemalloc
-    // issue has been fixed.
+    // As reading the input stream in memory is a bottleneck, we tune
+    // Reader::read_to_end() with a fast growing policy to limit
+    // recopies.  If MREMAP_RETAIN is implemented in the linux kernel
+    // and jemalloc use it, this trick will become useless.
     const CHUNK: uint = 64 * 1024;
 
     let mut vec = Vec::with_capacity(CHUNK);