Re:Who controls glibc?
by 2trill2spill on Tuesday May 08, 2018 @04:24PM
(#17024650)
> (bsd libc still 20% faster with modern CPUs
You have a source for that? it wouldn't surprise me, GNU code tends to be more bloated than a similar BSD licensed project.
My own benchmarks. The trick is SSE support.
darwin/bsd has that builtin, esp. since darwin can guarantee that their chips do support SSE. Generic linux builds do not, and -march-native or switching to sse optimized shared libs is rarely used.
But recently also bos and align_size support got better in other libc's, which do use clang and not gcc. gcc sucks big time with those optimizations. freebsd and darwin all use clang. This is in the ~60% ball figure.
Every 64-bit OS can guarantee SSE2 support, because it's baked into the x86-64 spec. Every single 64-bit Linux build can and does use SSE2 (unless someone explicitly turned that off for no reason). If there are performance differences, it's not due to chip support and crippled builds for compatibility.
oops: s,align_size,alloc_size,
The size of dynamically allocated malloc'ed structures, not just constants. The majority of pointers have an alloc_size, but no object_size (i.e. bos: __builtin_object_size).
Same as with stdlib++ btw, where strings are now uselessly bloated and most data structures are getting useless also.
Where are utf8 strings? u8"" constants only is for nothing. Everybody needs an u8 api.
Where are the secure _s extensions? Pickering about callbacks and Microsoft is all they can do. But they rather add env hooks. __bos/alloc_size support is getting better, but gcc still cannot do proper usable const expressions in C. It's a nightmare.
You still cannot compare strings, even not with the crazy wchar_t strings (size 2 or 4), nobody uses anymore. wcscmp only compares buffers, but not strings according to the unicode rules. I believe strings would be pretty important to support, not?
What about a fast malloc? Not even ptmalloc3 went in, there's still stone-age ptmalloc2.
double-close leads to crashes, really? Similar to freopen with NULL.
This is your great community consensus. BSD or even musl are far ahead.