Closed skynowa closed 9 years ago
That's certainly an odd value for str
, is there any reasoning behind it?
Soory. I mean, that add test for longest string. Instead "string" use str.
#define str "longest_string...................................................abc"
tfm::printf("%0.10f:%04d:%+g:%s:%p:%c:%%\n",
1.234, 42, 3.13, str, (void *)1000, (int)'X');
Sorry for the delay, I forgot about this.
Your second example is testing something quite different from the first, so I'm still not quite sure what the intention is here.
"%s"
. This is really testing the underlying implementation of operator<<(std::ostream&, const char*)
, but I guess it might be of interest to someone.Neither of these seem like particularly typical use cases, so I probably wouldn't put them in the main speed test - it is meant to be a simple "smoke test" to check that nothing has gone horribly wrong. However, if you'd care about performance, I'd encourage you to submit a pull request expanding the speed test into a full test suite with various different cases of interest. In that case I think it would make sense to compare against both libc printf and iostreams (boost::format
is so far behind that we may as well ignore it)