6 ms·
35MB seems relatively small already. What do you get from an 8MB binary that you don't from one 4x that size?
by kingnothing 6y ago
35MB seems relatively small already. What do you get from an 8MB binary that you don't from one 4x that size?
- qmmmur 6y ago27MB. Where that is important is context specific
- pantalaimon 6y ago> 35MB seems relatively small already 35 MB is huge! Are there any assets inside the binary?
- cesarb 6y ago> 35 MB is huge! For context, 35MB is two and a half boxes of high-density floppy disks. There were whole operating systems, complete with applications, smaller than that.
- pantalaimon 6y agoWere? My initrd + vmlinuz is still smaller than that today on a stock Ubuntu kernel.
- perl4ever 6y agoI remember when a OO framework like MacApp would produce a minimal "hello world" program that took up hundreds of KB and that was considered almost too bloated to be usable. I can't remember exactly how much, but the better part of a floppy to do nothing was ridiculous.
- erik_seaberg 6y agoSeems like a culture clash between “why would you not use your distro’s shared libraries?” and “containerize all the things!”
- qiqitori 6y agoAren't Go binaries completely static? That sort of is a large part of an operating system (the libraries minus hardware-related libraries) -- Just add a kernel (tens of MB) and whatever userland stuff you need to get your hardware to work (which could be "nothing" in some cases) and you're ready to go.
- pjmlp 6y agoQNX used to be shipped on a single high density floppy.
- distortedsignal 6y agoThere are no assets (other than a helpfile) inside the binary. This is (compiled) 35 MB of Golang.
- wlll 6y agoWhat OS/arch? I have a small program that compies to 16MB, 14 with -w on OS X. Compiling for Linuxx with -w results in a 14MB binary too.
- distortedsignal 6y agoThis is a binary with ~1800 LoC including comments and generous whitespace. Probably 16-1700 Executable SLoC. Mostly some API handling, file reading, and user input requests. I'm running the following go version: go version go1.14.4 darwin/amd64 Looks like the Linux and Darwin versions of the binaries are only a few hundred kb different.
- deleted 6y ago[deleted]
- jmalicki 6y agoFor context, the Starbucks app on Android is 92MB. My bank's app is 180MB. They might have assets, but modern app size has become ridiculous.
- pjmlp 6y agoThey are mostly assets or frameworks like React Native, Flutter, Xamarin what have you. Native Android doesn't need such big sizes.
- Rebelgecko 6y agoI'm not familiar with UPX compression so it might invalidate what I'm about to say. However it can be beneficial for performance if you fit more of your executable into CPU cache (actual results may vary based on access patterns and many other factors)
- makapuf 6y agoUPX is just a (nice) compresser for binaries, where running the executable really runs a small decompressor on the binary, gets a binary in ram and runs it. So your binary is not smaller in cache when executed.
- smabie 6y ago35mb seems small to you? That's an absolutely massive binary. But to answer your question, you're going to see some performance improvements if your binary can fit into lower levels of the CPU cache. Kdb+/q for example is less than 700kb, which mean that the entire thing can fit into the L1 instruction cache on high end server CPUs. And that size is even more impressive considering its only dynamically linked to libc and libpthread. This small size contributes to the out of this world performance the system has. And remember that's the language and the time series db.
- grey-area 6y agoSome of the gains here are from compression, does the compressed size matter for fitting into cache? Surely it's stored as the uncompressed size after expansion?
- smabie 6y agoYeah, if you're simply compressing the binary with upx or something, the uncompressed size is what actually matters. Though I guess it will decompress faster, the smaller it is. But I doubt that upx decompression speed is particularly important.
- adonovan 6y agoHello! You must be a fellow Googler. (The program we at Google use just to build our bloated programs is itself 180MB.)
- ikiris 6y agoCough python cough cough
- peteretep 6y ago... nothing except a vague feeling of self superiority, judging from the answers so far.
- distortedsignal 6y agoI mean, you're not entirely wrong. But also, since this is client side code, a smaller download means smaller utilities on client machines. Which is nice.