On Thu, 2026-12-03 at 12:02 +0000, Gary Guo wrote:
> On Thu Dec 3, 2026 at 11:14 AM GMT, Philipp Stanner wrote:
> > On Thu, 2026-12-03 at 11:41 +0100, Alice Ryhl wrote:
> > > On Thu, Dec 3, 2026 at 11:26 AM Philipp Stanner <[email protected]> 
> > > wrote:
> > > > In C we spent years explaining to people that the compiler should
> > > > decide what to inline, with only some exceptions. Yet for Rust we shall
> > > > decide ourselves. Why?
> > > 
> > > We make exactly the same decisions in C when we decide whether to
> > > declare a function as 'static inline' in a header file, or as a normal
> > > function.
> > 
> > Then why can't I decide that foo(), despite only consisting of three
> > lines, is a slow path, unimportant, can have its own symbol and does
> > not have to be inlined?
> 
> Why is `status` slow path?

status() may or may not be, but the hypothetical function foo() is.

This topic is being raised to improve my understanding, not to push
back against inline. I don't care; I can also add it to functions 5000
lines long if anyone insists on it.

Reply via email to