|
|
Subscribe / Log in / New account

Base

Base

Posted May 26, 2025 5:22 UTC (Mon) by jrtc27 (subscriber, #107748)
In reply to: Base by nix
Parent article: Status report on optional Rust in FreeBSD support

It's worth pointing out that, on FreeBSD, libc++ is still smaller than libc (just under half the size in fact). (Yes, that's glossing over the fact that much of libc++ is templates in headers that aren't instantiated unless used, but still, you don't pay for those unless you use them.)


to post comments

Base

Posted May 26, 2025 18:28 UTC (Mon) by comex (subscriber, #71521) [Link] (1 responses)

libc++ depends on libc, so that's a bit of an apples-and-oranges comparison.

But I suppose it still demonstrates that the added overhead isn't too high.

Base

Posted May 28, 2025 21:59 UTC (Wed) by jrtc27 (subscriber, #107748) [Link]

Yes, the point was to contextualise the size of libc++ in a wider system and show it's not taking a disproportionate amount of the space.

Base

Posted May 27, 2025 7:24 UTC (Tue) by tialaramex (subscriber, #21167) [Link] (4 responses)

So, other than the actual library, which you didn't count because "you don't pay for those unless you use them" it's smaller ?

That would have been true for the Perl too and of course it would be true for most languages so long as you decide you're "not paying" for code you didn't use.

Base

Posted May 27, 2025 19:48 UTC (Tue) by nix (subscriber, #2304) [Link] (2 responses)

No, it's smaller *including* the actual library (the header templates).

Base

Posted May 28, 2025 16:14 UTC (Wed) by tialaramex (subscriber, #21167) [Link]

Thanks, that wasn't at all what I understood from your original claim.

I guess we'll see how much bigger this gets before (if ever) FreeBSD decides maybe their policy makes no actual sense.

Base

Posted May 28, 2025 21:57 UTC (Wed) by jrtc27 (subscriber, #107748) [Link]

I wasn't including size of the actual header files on disk, because I wasn't for libc; this is just the .so files. But in terms of header files, /usr/include/c++ is a bit under a third the total size of /usr/include on FreeBSD. Yes, I realise that's comparing against not just libc but all system headers, but the point is not to be some highly-scientific comparison but instead to give helpful comparison points that illustrate it's not a bloated behemoth taking up all your disk space.

Base

Posted May 28, 2025 22:16 UTC (Wed) by jrtc27 (subscriber, #107748) [Link]

Ignoring the subtleties of native modules, for interpreted languages, the standard library implementation has to be present in full on any machine that wishes to run code written in that language. For compiled code, only the compiled bits need to be; anything that's in header files only needs to be present on the developer's machine at compile time.

For reference, /usr/lib/x86_64-linux-gnu/perl-base on an Ubuntu 22.04 system is 5.5M on its own, and the parts of /usr/share/perl/5.34.0 from perl-modules-5.34 is a whole 16.3M, which doesn't even include all the pre-compiled native modules. /lib/libc++.so.1 on an amd64 FreeBSD 14.2-RELEASE-p3 system is 970K, and /usr/include/c++ on that same system is 7.3M, so in total under half the size of Ubuntu's perl-modules-5.34 alone.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds