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

Lines of code are expensive, because we expect human beings to reread them with almost no help from tools. Concise code is a temporary problem for novices, until they grow into experts. Bulky code is an ongoing problem for everyone and we don’t have a solution.


While I mostly agree with you, I think that use of double indirect pointers is rare enough that in effect each use of one probably counts as a "line of code" when trying to understand what's going on.

The one Linus doesn't like likely runs faster (at a microarchitectural level), it's also the thing I've done for 40 years now, it's what comes out of my fingers when I code linked lists, for me at least it's more understandable because I already understand it


It's very unlikely it is faster.


A good compiler should keep *p in a register because there are no aliases that might modify it, but a poor compiler might follow p a second time.




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

Search: