chromium / subspace

A concept-centered standard library for C++20, enabling safer and more reliable products and a more modern feel for C++ code.; Also home of Subdoc the code-documentation generator.
https://suslib.cc
Apache License 2.0
89 stars 15 forks source link

Invert the order of the flag and value in Option #367

Closed danakj closed 1 year ago

danakj commented 1 year ago

@davidben found that std's ordering is much smaller binary size than absl's in Chromuim.

danakj commented 1 year ago

Seems this is a clear win on ARM32 but not a clear win or barely worse elsewhere.

davidben commented 1 year ago

Yeah, we probably should figure out what's going on here first. 🙂

danakj commented 1 year ago

The difference seen here was actually a clang/llvm bug: https://github.com/llvm/llvm-project/issues/66709

We are better to keep the bool last so users can make use of the resulting tail padding.

davidben commented 1 year ago

Indeed after the Clang bug is worked around, bool last is smaller too.