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

If I remember correctly (been a long time), most compilers would implement many cases of struct return by letting the caller pass the address of a block of (stack) memory to contain the return value. The function can then optimize things to get rid of its local copy, operate directly on the intended target, and the caller doesn't need to perform any copies.


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

Search: