了解 Red/System 与 GCC 相比的编译优化

Understanding Red/System compilation optimizations compared to GCC

在阅读 Red site 时,我看到一条声明,说明编译 hello world Red/System 程序会创建..

"...a 162 bytes ELF binary, while a similar C code would produce a 5-6KB binary using Gcc"

太棒了。有人可以 explain/point 向我介绍使此类优化成为可能的技术吗?

它是通过一个几乎为空的运行时库(只有几个系统调用包装器)和一个 ELF 发射器实现的,它不会在 4K 页面边界上对齐部分以实现最佳加载。

不过,Red/System 0.1.0, so in its very early days, not true anymore (now it would be similar to other compilers). Though we still have a -r compilation option for compiling Red/System code without any runtime, but as nobody uses it, it might not work anymore (should be easy to fix anyway if someone needs it, just drop by Red's chat 确实如此,并要求它。 ;-))