3 ms·
> But no other language claims to be faster than C for general-purpose programming, because none are. The "faster than C for general-purpose programming" is a
by tialaramex 10mo ago
> But no other language claims to be faster than C for general-purpose programming, because none are.
The "faster than C for general-purpose programming" is a pretty woolly claim so I'm not entirely surprised nobody claims that, but equally I think to be sure that "because none are" would need some serious caveats to make it true.
In particular you're going to have to say you think it doesn't matter how much developer time is needed. A project where C programmers spend five hours to make it run in 4 seconds is in this caveat "20% faster" than a project where Alt Lang programmers spend five minutes to make it run in 5 seconds - because only those seconds count. This is not how the real world works so it's a pretty nasty caveat.
- j_w 10mo agoOf course it's true in the case of sqlite. It's one of the most used pieces of software ever, and user cpu time spent is going to dwarf any developer time. Your example should instead be: - 5 hours of developer time to run in 4 seconds * n - 5 minutes of developer time to run in 5 seconds * n As long as n <= 17,700, then the developer time is "not worthwhile." This assumes that you value user time as much as developer time. In the case of sqlite, the user time may as well be infinite for determining that side of the equation. It's just that widely used.
- astrobe_ 10mo agoAlso battery life. 20% less time, 20% more battery. But OP is correct, companies don't care as long as it doesn't translate into higher sales (or lower sales because the competitor does better). That's why you see that sort of optimization mainly in FOSS projects, which are not PDD (profits-driven development).
- bluecalm 10mo ago>>A project where C programmers spend five hours to make it run in 4 seconds is in this caveat "20% faster" than a project where Alt Lang programmers spend five minutes to make it run in 5 seconds - because only those seconds count. This is not how the real world works so it's a pretty nasty caveat. For any project with non-trivial amount of users the C programmer did better. I mean I know companies like to save money and move the costs (time, electricity, hardware costs) to customers but if you care about users any non-trivial speed improvement is worth a lot in aggregate, surely more than your time implementing it.
- tialaramex 10mo agoI see a few people have been caught by this. Databases are a problem space which can absorb all available effort. So if you spend five hours making thing U as fast as it could be that's five fewer hours you can dedicate to thing V or thing W, not to mention X, Y, Z and so on.