taepper commented on issue #51834:
URL: https://github.com/apache/arrow/issues/51834#issuecomment-6032871657
```
== frame sizes in bytes ==
g++ -O0 (no extra context) A_Current=1520 B_Single=336
C_Scoped=512 D_ClangGccExtension=512 E_Lambda=400
g++ -O0 -DARROW_EXTRA_ERROR_CONTEXT A_Current=1536 B_Single=336
C_Scoped=528 D_ClangGccExtension=528 E_Lambda=400
g++ -O2 (no extra context) A_Current=1248 B_Single=176
C_Scoped=176 D_ClangGccExtension=32 E_Lambda=256
g++ -O2 -DARROW_EXTRA_ERROR_CONTEXT A_Current=1264 B_Single=192
C_Scoped=192 D_ClangGccExtension=192 E_Lambda=272
```
<details>
<summary>
the benchmarked function
</summary>
```
using BigObject = std::array<uint8_t, 128>;
ARROW_NOINLINE Result<BigObject> Big();
ARROW_NOINLINE BigObject BigPlain();
#define REP8(M) \
M(auto obj, Big()); \
M(obj, Big()); M(obj, Big()); M(obj, Big()); M(obj, Big()); \
M(obj, Big()); M(obj, Big()); M(obj, Big()); \
ARROW_UNUSED(obj); \
return Status::OK();
Status A_Current() { REP8(ARROW_ASSIGN_OR_RAISE) }
// Reference points
Status B_Single() {
ARROW_ASSIGN_OR_RAISE(auto obj, Big());
ARROW_UNUSED(obj);
return Status::OK();
}
Status C_Scoped() {
BigObject obj;
SCOPED(Big()) SCOPED(Big()) SCOPED(Big()) SCOPED(Big())
SCOPED(Big()) SCOPED(Big()) SCOPED(Big()) SCOPED(Big())
ARROW_UNUSED(obj);
return Status::OK();
}
// The two alternative macro implementations from the comment above
Status D_ClangGccExtension() { REP8(AOR_STMTEXPR) }
Status E_Lambda() { REP8(AOR_LAMBDA) }
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]