如何编写像 uTorrent 这样的轻量级可执行文件
uTorrent 一直以其 270KB 的可执行文件和较小的内存占用给我留下了深刻的印象,同时与大小为其 30 倍的类似工具竞争。 我可以想到我的计算机上的其他几个工具可以使用这样的“debloated”版本。
假设要编写一个小于 300KB 的 Twitter 客户端,应该采用什么方法?
- 我猜唯一的语言选项是 C、C++ 和汇编程序(我是对的吗?)。
- 有仍然可以使用的框架吗?
- 您是否必须雇用那些疯狂演示场景中保持 exe 小的策略?
- 这样的东西还能维护吗?
我并不是一个真正的 win32 程序员,所以这个问题的部分内容可能没有意义。 欢迎指正。
Possible Duplicate:
Programming slim C++ programs (like uTorrent) for Windows
uTorrent has always impressed me with its 270KB executable and small memory footprint while competing with similar tools which are 30 times its size. I can think of several other tools on my computer that could use such a "debloated" version.
What methods should one employ in trying to write, let's say, a Twitter client in under 300KB?
- I'm guessing the only language options are C, C++ and Assembler (am I right?).
- Are there frameworks you can still use?
- Do you have to employ those crazy tactics from the demo scene to keep the exe small?
- Can something like that still be maintainable?
I am not really a win32 programmer, so parts of this question may not make sense. Corrections are welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对你的观点的贡献:
至少在开始时没有疯狂的策略:
“我们应该忘记小效率,大约 97% 的时间:过早优化是根源一切邪恶。”
并查看此后的第一个项目符号:
C、C++ 和汇编程序:C++,然后是 C,然后是汇编程序。
my contribution to your opinion:
no crazy tactics in the beginning at least:
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil."
and looking at the first bullet after this:
C, C++ and Assembler: C++, then C, then Assembler.