a small protobuf implementation in C
> There are undeniably power users for whom every last bit of performance translates to very large sums of money, and I don’t claim to know how to satisfy them otherwise.
That is the key, right there.
In 1970, C may have been considered a general-purpose programming langauge. Today, given the landscape of languages currently available, C and C++ have a much more niche role. They are appropriate for the "power users" described above, who need every last bit of performance, at the cost of more development effort.
When I'm working in C, I'm frequently watching the assembly language output closely, making sure that I'm getting the optimizations I expect. I frequently find missed optimization bugs in compilers. In these scenarios, undefined behavior is a tool that can actually help achieve my goal. The question I'm always asking myself is: what do I have to write in C to get the assembly language output I expect? Here is an example of such a journey: https://blog.reverberate.org/2021/04/21/musttail-efficient-i...
I created the https://github.com/protocolbuffers/upb project a long time ago. It's written in C, and over the years I have gotten it to a state where the speed and code size are pretty compelling. Both speed and code size are very important to the use cases where it is being used. It's a relatively small code base also. I think focused, performance-oriented kernels are the area where C makes the most sense.
Run compilers interactively from your web browser and interact with the assembly
Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
Sample Rust toys
For one example,
is a program that mmap's an anagram dictionary file and builds a fast-n-dirty hashmap dictionary over the file data. It took about an afternoon to write and was pretty decent.
EXPOSED: The Leetcode C++ Cheat Code!!
1 project | dev.to | 27 Aug 2023
Resources for learning to write high-performance C code?
1 project | /r/cprogramming | 16 Aug 2023
Teaching Programming in the Age of ChatGPT
1 project | news.ycombinator.com | 20 Jul 2023
How to learn Computer Engineering as a High Schooler
1 project | /r/ECE | 14 Jul 2023
Is there any C++ tutorials that don't assume this is your first language?
2 projects | /r/learnprogramming | 8 Jul 2023