I've seen the ROS wrapper for fmt
library, called rosfmt, and was wondering if the performance is somehow better than using the ROS_WARN_STREAM(...)
or similar functions
The exact answer to your question is what only direct profiling on the same system can give. In fact, it is expected that libfmt
would beat printf
system call because it implements complex output treatment, actually, a programming language, like awk
does. As can be observable from the code, libfmt
hardcodes many routines, so it can be faster than STL streams, but it depends totally on the current implementation. For ROS, avoidance of printf
-based routines is definitely an advantage.