Update benchmark results in README.md

This commit is contained in:
Keith Winstein
2012-03-13 19:21:46 -04:00
parent 56e52190eb
commit 45fd4b914c
+9 -11
View File
@@ -143,21 +143,19 @@ Advice to distributors
A note on compiler flags: Mosh is security-sensitive code. When making A note on compiler flags: Mosh is security-sensitive code. When making
automated builds for a binary package, we recommend passing the option automated builds for a binary package, we recommend passing the option
`--enable-compile-warnings=error` to ./configure. On GNU/Linux with `--enable-compile-warnings=error` to ./configure. On GNU/Linux with
gcc and a system boost, the package should compile cleanly with g++ or clang++, the package should compile cleanly with
-Werror. Please report a bug if it doesn't. `-Werror`. Please report a bug if it doesn't.
Mosh ships with a default optimization setting of `-O2`. Some Mosh ships with a default optimization setting of `-O2`. Some
distributors have asked about changing this to `-Os` (which causes a distributors have asked about changing this to `-Os` (which causes a
compiler to prefer space optimizations to time optimization). We have 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 benchmarked with the included `src/examples/benchmark` program to test
preferable. In both cases, -Os did produce a smaller binary (by up to this. The results are that `-O2` is 40% faster than `-Os` with g++ 4.6
40%, saving a few hundred kilobytes), but at a considerable cost to on GNU/Linux, and 16% faster than `-Os` with clang++ 3.1 on Mac OS
mosh's performance -- about 28-31% for both compilers, or similar to a X. In both cases, `-Os` did produce a smaller binary (by up to 40%,
typical net benefit from enabling optimization. While Mosh is not saving almost 200 kilobytes on disk). While Mosh is not especially CPU
especially CPU intensive and mostly sits idle when the user is not intensive and mostly sits idle when the user is not typing, we think
typing, our recommendation to distributors would be to stay with the the results suggest that `-O2` (the default) is preferable.
default of `-O2` unless saving space on disk is particularly
important.
More info More info
--------- ---------