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

Last I checked static inline was merely a hint that compilers need not take. They all do, but by definition it's not a zero cost abstraction.




`inline` is a hint, but he declares `static_inline` in the preprocessor to include `__attribute__((__always_inline__))`, which is more than just a hint. However, even `always_inline` may be troublesome over translation units, though we can still inline things in different translation units if using `-flto`, I believe there are occasional bugs. For libraries we'd also want to use `-ffat-lto-objects`.



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

Search: