1
0
mirror of https://github.com/golang/go synced 2024-11-21 23:24:41 -07:00

go_faq: a simple binary is a little smaller now

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
This commit is contained in:
Rob Pike 2012-03-07 15:29:26 +11:00
parent c3f4319a24
commit 0130a31366

View 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>