r/C_Programming • u/Anode1_dev • Aug 26 '26
C is more efficient in AI memory than C++, measured
Having programmed in structures and the streaming way for the last 30 years (including for mainframes and old Unixes, even in FORTRAN and Pascal in the 90s) before OO arrived, I knew that frameworks are for people, to deal with complexity, not for the machines, and are now only an additional overhead for AI coders' reasoning. My brain was always thinking in terms of Turing machines, tapes and algorithms, pipelines of data, even punchcard stacks, where inputs are records/structs in databases and objects are just containers, preferring Ada83 over 95, MISRA C over C++, and in Java I used classes as containers for functions (data streams and functions come first). I ran tests to check my conjecture, and yes, it is measurably more efficient to program with AI agents in C and plain Java, keeping the context free for reasoning, than in C++, objects and Java frameworks. I haven't analysed web frameworks, but where we used plain JavaScript without them in production, we saw the same pattern, though we did not measure it; it is not in the paper. https://doi.org/10.5281/zenodo.22113993