Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I would expect the compiler to ensure that all references to true and false reference single addresses, too.

Why? If you're sending a constant true to a channel, wouldn't that true value exist in the stack frame for the function call? It seems like that would make more sense than a pointer to a constant true value being stored in the stack frame and dereferencing that every time you need the constant value.

> So, at best, the difference of the more obscure code is to, maybe, gain 8 bytes. What do I overlook?

Constructing channels in a loop would potentially multiply memory usage here



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: