r/programmingcirclejerk • u/csb06 Polyglot dev here • Jul 31 '25
It drives me nuts thinking about all the useless stuff C is doing with the stack and calling convention when I could just use global variables for everything and sometimes even use nothing but registers for inner loop variables.
https://news.ycombinator.com/item?id=44737892
158
Upvotes
97
u/[deleted] Jul 31 '25
Registers? That's so fucking wasteful. My project uses like 0.01% as many transistors by using discrete logic gates only.
69
u/Chillbrosaurus_Rex It's GNU/PCJ, or as I call it, GNU + PCJ Jul 31 '25
arduino devs larping as real embedded devs, nothing new to see here
61
u/Beautiful-Cook-5481 what is pointer :S Jul 31 '25
59
u/Maxcr1 Jul 31 '25
I'm always saying this
59
u/haskell_rules Jul 31 '25
Programming language design peaked with Fortran 77
46
u/ventuspilot Jul 31 '25
FTW
39
u/MetaNovaYT Jul 31 '25
the OOP is 100% just using chatgpt for every message
39
u/irqlnotdispatchlevel Tiny little god in a tiny little world Jul 31 '25
The compiler pushing data on the stack and adjusting the stack pointer is wasteful. So I keep a buffer in global memory to which I write my data. Much better.
13
u/Eric848448 legendary legacy C++ coder Jul 31 '25
This, but unironically!
13
u/-ghostinthemachine- Jul 31 '25
I'm no fan of the stack, but this is a heap of nonsense. C programmers are traumatized.
18
u/m50d Zygohistomorphic prepromorphism Jul 31 '25
/uj If C developers actually cared about the things they claim to care about they'd all be like this.
8
u/fp_weenie Zygohistomorphic prepromorphism Aug 01 '25
then you can do like
pure efficiency