]> Cypherpunks repositories - gostls13.git/commitdiff
go_faq: a simple binary is a little smaller now
authorRob Pike <r@golang.org>
Wed, 7 Mar 2012 04:29:26 +0000 (15:29 +1100)
committerRob Pike <r@golang.org>
Wed, 7 Mar 2012 04:29:26 +0000 (15:29 +1100)
About 10% for hello, world.
Maybe more reductions will come.
Also clarify that we're comparing printf against Printf
(gcc can optimize aggressively, making this a different
sort of comparison).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5756070

doc/go_faq.html

index e06cab14cb6b13caacfcfa20e10bf56be7e5460f..0b770377bbea0f0b5b587ddc420a9b9f5f1e6cad 100644 (file)
@@ -1375,9 +1375,11 @@ type checks, reflection, and even panic-time stack traces.
 </p>
 
 <p>
-A trivial C "hello, world" program compiled and linked statically using gcc
-on Linux is around 750 kB.  An equivalent Go program using <code>fmt.Printf</code>
-is around 1.3 MB, but
+A simple C "hello, world" program compiled and linked statically using gcc
+on Linux is around 750 kB,
+including an implementation of <code>printf</code>.
+An equivalent Go program using <code>fmt.Printf</code>
+is around 1.2 MB, but
 that includes more powerful run-time support.
 </p>