3 ms·
Yep. Thread locals are probably faster than the other solutions shown too. It’s confusing to me that thread locals are “not the best idea outside small snippet
by srcreigh 10mo ago
Yep. Thread locals are probably faster than the other solutions shown too.
It’s confusing to me that thread locals are “not the best idea outside small snippets” meanwhile the top solution is templating on recursion depth with a constexpr limit of 11.
- groundzeros2015 10mo agoThe method of having static variables to store state in functions is used heavily in ANSI C book. It’s honestly a beautiful technique when used prudently.