Skip to content

Instantly share code, notes, and snippets.

@jessta
Created March 29, 2012 00:44
Show Gist options
  • Save jessta/2231926 to your computer and use it in GitHub Desktop.
Save jessta/2231926 to your computer and use it in GitHub Desktop.
Go hello word binary size
int main(){
write(1, "hello world\n", 12);
}
/*
[jessta@book ~]$ gcc -static -Os hello.c
[jessta@book ~]$ du -h ./a.out
636K ./a.out
*/
package main
import "os"
func main() {
os.Stdout.Write([]byte("hello world"))
}
/*
[jessta@book ~]$ go build hello.go
[jessta@book ~]$ du -h ./hello
544K ./hello
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment