r/C_Programming • u/SeaInformation8764 • May 26 '26
Project Small and fast vector implementation
https://github.com/ephf/vectorHello, just wanted to share this small (<150 lines) header for dynamic arrays in C. Feel free to look through it and show what could be done better or ask questions. AI was not involved in the making of this.
9
Upvotes
•
u/AutoModerator May 26 '26
Hi /u/SeaInformation8764,
Your submission in r/C_Programming was filtered because it links to a git project.
You must edit the submission or respond to this comment with an explanation about how AI was involved in the creation of your project.
While AI-generated code is not disallowed, low-effort "slop" projects may be removed and it's likely that other users push back strongly on substantially AI-generated projects.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/ischickenafruit May 30 '26
Performance claims without comparative benchmarks are basically election promises. Code that “should” be fast is slower than code that is fast and the only way to define fast is WRT to specific use case and benchmark set , compared to other fast implementations. Is this fast with 100 elements (in which case why bother) or with 100k?
3
u/ischickenafruit May 29 '26 edited May 29 '26
The first thing that stands out to me is that the code is completely unreadable. And not in any way that benefits performance. Long strings of single character variable names including pointer arithmetic? Why? This is not JavaScript. We’re not paying per character. Here’s an example. Nobody wants to debug this when you’ve got a subtle bug.