
22 Feb
2014
22 Feb
'14
7:19 a.m.
Rob Stewart
On February 21, 2014 5:04:13 PM EST, Vladimir Batov
wrote: Still what I am puzzled by is that lexical_cast performance table in the docs claims to be far ahead of scanf... and I cannot reproduce their numbers.
Perhaps that's because you're using newer hardware or libraries than they used for their tests.
Nuh, my home laptop about 10 years old. Trying the code with Microsoft Visual C++ 2010 Express and gcc 4.8.2. Will try again on my Linux power-house on Monday. For fun I quickly hacked together a scanf-based converter and plugged it into the "convert" framework. The optimized build is as efficient or close to the raw scanf()... Only safe... And beats lexical_cast in my tests...