5 ms·
That's cool, but with disk space and memory being as cheap as they are, is this still a big deal in anything but the smallest of embedded environments?
by gtaylor 11y ago
That's cool, but with disk space and memory being as cheap as they are, is this still a big deal in anything but the smallest of embedded environments?
- joshuapants 11y agoIt's small with a small program, but for something substantially larger it can certainly make a difference
- Cyph0n 11y agoI think this kind of thing demonstrates portability at a lower cost and better compile-time optimizations. You would think the other languages, especially C++ and Rust, would do better in the latter.
- oldmanjay 11y agoOptimizing for size often has an inverse impact on runtime, for instance if the compiler would have inlined heavily. edit: tense clarification
- pcwalton 11y agoThe real problem is that glibc has a hard time being statically linked. We just use the native system C library in Rust, which on Linux is usually glibc. We could focus on musl support in order to get true static linking, but there are much higher priority things like 1.0 stability, optimizations, and compiler performance (though we'd take a patch of course). The fact is that pure static linking is rarely done anymore, at least on mainstream desktop/mobile/server systems, so it's not on anybody's critical path. Dynamically linking to glibc does not really provide "better compile-time optimizations". LLVM already understands the libc functions that really benefit from inlining, like memcpy.
- 23david 11y agoI agree that disk space has gotten a lot cheaper, but bandwidth speed hasn't increased tremendously. Binary sizes definitely are an issue. And re:memory, it's pretty tight on most end-user machines. By default, most laptops only come with 4-8GB of RAM. And in the cloud, memory cost is perhaps even more expensive. On ec2, a 'large' instance usually has only between 4-8GB of RAM. The default small instances have only 2GB of RAM, which doesn't give much room left over for applications after you account for the OS and various utilities. It can definitely add up.
- mwcampbell 11y agoDoes anyone else find it obscene that 4 GB of RAM is considered inadequate in a laptop? And I'm not just saying this in response to your comment; that seems to be a common opinion. For example, in the 2012 novel _Off to Be the Wizard_ (which I found quite entertaining), the protagonist answers the question, "What on earth can a person do with 4 gigabytes of RAM?" with, "Upgrade it immediately."
- Nadya 11y agoThere are two sides of this coin. 0) As programs are expected to do more or run faster, they are required to use more computational power and memory. As examples, this is especially true of 3D Rendering or Video Editing software. 1) Because of the price and abundance of hardware - many programmers have stopped caring about nearly all optimization unless it brings their program to a halt. Requiring more computational power and memory to run many of these programs. To many people $50-$60 for 8GB of 2x4GB DDR3 RAM isn't a lot of money. It's about as much as a date to the movies and cheaper than going out to dinner with the family.
- mixmastamyk 11y agoMany people use laptops as their primary workstation these days.
- Psyonic 11y agoWelcome to the "NodeWebkit" world. Where wanting to open a file bigger than 2MB is considered "unreasonable" and an app taking 200MB of RAM to show a few small files is normal.
- krupan 11y agoThe smallest of embedded environments would love to have language options besides C and assembly, thank you very much. :-)