Remix.run Logo
CyberDildonics 2 days ago

The memory allocators of that time were also better than the ones 12 years their prior. That's the point.

The point is that memory allocation shouldn't be a bottleneck either way. If it is the program needs to be optimized or redesigned. Better allocators give you more slack, they don't solve the problem. If the problem is already solved, then a basic allocator isn't going to make a big performance difference because it isn't the bottleneck.

those bad data structures would also cause "damage to speed and interactivity" or whatever. This isn't very hard to understand.

It depends on how much they are used and how much contention there is. Sometimes putting a mutex around things is fine.

But these are extremely common specified functions, they are called everywhere all the time

Not necessarily, especially for C string functions, but they do get linked in so it's a good thing musl makes them small.

I said "backbone", not "bottleneck".

Then the point is lost, because 'backbone' doesn't mean anything if it works. If it isn't a bottleneck in throughput or latency anywhere then the speed doesn't matter.

The other important thing is that better stuff can be included in pieces as it's needed. The reverse isn't true. If you use a big fat C library, you have a dependency that isn't going to get better.

Not really. I have to spell it out apparently: actual programs written by normal human programmers do those things, all the time,

You spelled it out last time, it's just not true in the sense that programs have to have these functions as bottlenecks. Strings, allocators and memory copying can all be dealt with independently, but again it's rare that strings and allocations really need to be the bottleneck and in those circumstances you probably want more than a different standard library anyway.

in the imaginary fantasy land people have in their heads where they make up arguments to themselves about how, if every program was written how they liked it,

I'm not sure what this is supposed to mean, there is nothing I've said that doesn't make perfect sense. If you want something to go faster you can make it go faster. A better allocator pales in comparison to lifting allocations out of hot loops.

My point is the musl is useful and the disadvantages are easy to work around. I'm not really sure what your point is, do you think people are going to force you to use it?

barrkel 2 days ago | parent [-]

Your point seems to be that if you use a slow standard library and complain, it's not a problem with the slow standard library because you can just reimplement the slow parts independently.

The problem with your argument is that it's a universal argument against performance. And if an argument is universal, then it doesn't have any information value.

CyberDildonics 2 days ago | parent [-]

Your point seems to be that if you use a slow standard library and complain, it's not a problem with the slow standard library because you can just reimplement the slow parts independently.

No, this is something that nuanced. The title is wrong because musl isn't going to prevent you from writing fast software.

Whatever benefit there is to a different libc, is absolutely miniscule compared to do actual optimizations like avoiding allocations.

I'll give you real numbers: if you put allocations of short vectors of a dozen floats in a hot loop, when you lift the allocations out your program is going to instantly get about 10x faster. The allocation is no longer going to be the bottleneck, it will be marginal and then a faster allocator isn't going to matter at all.

If someone gets an easy speedup from using a different libc that's great, but the vast majority of time it isn't going to matter and isn't going to be where any real speedups come from. The difference is a small percentage speedup vs orders of magnitude.

The amounts to the title being wrong, using musl or a small standard library just doesn't prevent a program from running fast. It is a tiny difference and even that tiny difference can be changed from things like better allocators which you would do anyway with a standard libc.