r/C_Programming • • May 26 '26

Project Small and fast vector implementation

https://github.com/ephf/vector

Hello, 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

15 comments sorted by

View all comments

Show parent comment

3

u/ischickenafruit May 29 '26

There’s no need for it to be written this way. Intermediate variables will be eliminated by the compiler.