3 ms·
The author guessed a few things wrong: * fmt.Println pulling in 300KB isn't proof that Go's standard library isn't "well modularized". It's the wonders of Unic
by lazyjones 7y ago
The author guessed a few things wrong:
* fmt.Println pulling in 300KB isn't proof that Go's standard library isn't "well modularized". It's the wonders of Unicode and other code that is actually used.
* 900K for the runtime isn't surprising when you have complex garbage collection and goroutine scheduling among other things
- majewsky 7y ago> fmt.Println pulling in 300KB isn't proof that Go's standard library isn't "well modularized". It's the wonders of Unicode and other code that is actually used. I would guess a large part is that it has to pull in the entire reflection library to support format verbs like %#v which renders the argument as a Go literal.
- knz42 7y agoThe C library supports unicode too nowadays (at least the GNU C library does) yet linking a simple program that uses printf does not import 300KB of code. The answer comes from the reflection code as the other commenter states.