Placing functions

25 points by ThinkChaos


icefox

This is pretty cool, it outlines the problem well as always coming down to “sometimes we want a constructor function to be able to take a pointer telling it where to construct, and sometimes not”. I actually think it might be best to express at the ABI level like it already partially is; it’d just come down to “if a function returns a value, you have one version that returns a value and one version that gets given a pointer to stick the value into” and it’s the compiler’s job to decide which to use. Buuuuuut I confess I haven’t really thought about how the compiler should decide which to use… let alone how to influence its decision.

Qyriad

I’d honestly really like numbers on how much overhead we pay with out-of-place construction. It doesn’t sound fun to benchmark though.