|
|
|
|
|
by pornel
844 days ago
|
|
Such comparison exaggerates the difference, because it’s a one-time constant overhead, not a multiplicative overhead. i.e. all programs are larger by 275KB, not larger by 20x. Rust doesn’t have the privilege of having a system-wide shared stdlib to make hello world executables equally small. The overhead comes from Rust having more complex type-safe printf, and error handling code for when the print fails. C doesn’t handle the print error, and C doesn’t print stack traces on error. Most of that 200KB Rust overhead is a parser for dwarf debug info to print the stack trace. |
|