aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
authorGravatar Keith Winstein <keithw@mit.edu>2012-03-13 19:21:46 -0400
committerGravatar Keith Winstein <keithw@mit.edu>2012-03-13 19:21:46 -0400
commit45fd4b914cbf3f527a2d0b9da3e00b0ad320c677 (patch)
tree0a6751e6adde98d59da15583ced9347c4e506f74 /README.md
parent56e52190eb42a5963e0fa0a4d98e6c2ce7115841 (diff)
Update benchmark results in README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md20
1 files changed, 9 insertions, 11 deletions
diff --git a/README.md b/README.md
index 6869b9d..543eeec 100644
--- a/README.md
+++ b/README.md
@@ -143,21 +143,19 @@ Advice to distributors
A note on compiler flags: Mosh is security-sensitive code. When making
automated builds for a binary package, we recommend passing the option
`--enable-compile-warnings=error` to ./configure. On GNU/Linux with
-gcc and a system boost, the package should compile cleanly with
--Werror. Please report a bug if it doesn't.
+g++ or clang++, the package should compile cleanly with
+`-Werror`. Please report a bug if it doesn't.
Mosh ships with a default optimization setting of `-O2`. Some
distributors have asked about changing this to `-Os` (which causes a
compiler to prefer space optimizations to time optimization). We have
-benchmarked mosh with g++ 4.6 and clang++ 2.9 to see if `-Os` might be
-preferable. In both cases, -Os did produce a smaller binary (by up to
-40%, saving a few hundred kilobytes), but at a considerable cost to
-mosh's performance -- about 28-31% for both compilers, or similar to a
-typical net benefit from enabling optimization. While Mosh is not
-especially CPU intensive and mostly sits idle when the user is not
-typing, our recommendation to distributors would be to stay with the
-default of `-O2` unless saving space on disk is particularly
-important.
+benchmarked with the included `src/examples/benchmark` program to test
+this. The results are that `-O2` is 40% faster than `-Os` with g++ 4.6
+on GNU/Linux, and 16% faster than `-Os` with clang++ 3.1 on Mac OS
+X. In both cases, `-Os` did produce a smaller binary (by up to 40%,
+saving almost 200 kilobytes on disk). While Mosh is not especially CPU
+intensive and mostly sits idle when the user is not typing, we think
+the results suggest that `-O2` (the default) is preferable.
More info
---------