Re:The C++20 Naughty and Nice List for Game Devs
by tubs on Monday December 25, 2023 @08:17AM
(#38762347)
For me the compile time increases are a killer, even if the api is considerably nicer.
[ Parent
| on HN ]
Re:The C++20 Naughty and Nice List for Game Devs
by danpla on Monday December 25, 2023 @11:32AM
(#38763881)
Unfortunately, if you're using the standard library, you get this just by switching to the C++20 mode. For example, the committee decided to put tons of std::ranges-related stuff right in <algorithm>.
https://www.reddit.com/r/cpp/comments/o94gvz/what_happened_w...
Re:The C++20 Naughty and Nice List for Game Devs
by gumby on Monday December 25, 2023 @11:51AM
(#38764043)
It isn’t just a nicer API but type safe and much faster at runtime.
Since I rarely compile all my code at once (usually just a single file followed by a re-link) compile time doesn’t matter much. And that’s even though while editing or writing code I don’t have all the slowdown bloat of an IDE so compile time is more noticeable.
Re:The C++20 Naughty and Nice List for Game Devs
by tubs on Monday December 25, 2023 @03:26PM
(#38765802)
In my experience if you're doing perf critical stuff with string formatting you won't be using anything like fmt or printf, and for everything else the runtime difference is almost entirely unimportant.
Re:The C++20 Naughty and Nice List for Game Devs
by vitaut on Tuesday December 26, 2023 @08:03PM
(#38777875)
{fmt} is commonly used for performance critical code because it provides some of the fastest numeric formatting and I/O:
* https://vitaut.net/posts/2020/fast-int-to-string-revisited/ * https://github.com/fmtlib/fmt/pull/1882 * https://vitaut.net/posts/2020/optimal-file-buffer-size/
Here's just one example: https://aras-p.info/blog/2022/02/03/Speeding-up-Blender-.obj...