lichray marked an inline comment as done. lichray added inline comments.
================ Comment at: src/charconv.cpp:34 + +#define APPEND1(i) \ + do \ ---------------- lichray wrote: > mclow.lists wrote: > > I'd really like to see some numbers here showing how this (somewhat > > awkward) code performs better than the straightforward versions. > > > > Because maintenance is forever. > > > > Note: I'm sure that this was true on older compilers - but is it true today? > One thing I could try may be using return values rather than output > parameters, like > ``` > buffer = append3(buffer, b); > ``` > But I really don't think doing these makes the code any bit more maintainable > comparing to > ``` > APPEND3(b); > ``` > , which looks very straightforward and expressive to me... OK, after several attempts, I figured out that by eliminating side-effects to the `buffer` pointer in the helper functions, Clang now generates code of the same quality, and runs statistically faster. Repository: rCXX libc++ https://reviews.llvm.org/D41458 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits