C is portable assembly created to write operating systems, device drivers, very basic and performance critical tools such as a shell or cat, and rich terminal software for higher-level applications, such as a web browser.
Nobody should care for it otherwise. If you think these types and functions that map to various processors assembly are crazy, don't use C. Use Rust, FIOC, Node.js or anything else. Here are some facts:
1. Nobody cares if your program is 3% slower. 2. If you're a hobbyist, like most people here, nobody cares about your program, period. There's no reason to optimize it. There's no spiritual perfection or nirvana to be achieved. 3. If you're a professional, unless you're doing something huge, development cost and time is way more important than execution speed. OMG! I spent 4 hours making GetCustomerCreditBlock() 3ms faster! Who gives a fucking damn? You're not paid to use C. Write good algorithms and be mindful of scalability (e.g. O(n•log(n)) better than O(n^2)) and don't give a shit about raw speed if it affects readability, stability or dev time.
Name:
Anonymous2019-10-01 9:32
>>5 Time complexity matters a lot less when writing real algorithms than is typically advertised. Its often far more important to optimize for the branch predictor and cache, which means algorithms with low entropy and good locality. O(nlogn) algorithms tend to do lots of branching, and lose far more to simpler O(n^2) algorithms.