|
Boost : |
Subject: Re: [boost] [xpressive] Performance Tuning?
From: Edward Grace (ej.grace_at_[hidden])
Date: 2009-07-28 13:09:20
> When I compile and run the tests now, I get this:
> initializing input strings...
> Calibrating overhead......done
> Timer overhead (t_c) ~= : 12
> Jitter ~= : 8.43769e-015
> qi_parse vs atoi : 170.429 170.438 170.482% faster.
> qi_parse vs strtol : 167.589 167.601 167.668% faster.
> strtol vs atoi : 1.04669 1.05746 1.06165% faster.
> qi_parse vs qi_parse : 0 0 0% faster.
Hi OvermindDL1,
When you've woken up would you mind taking a quick squiz at the
following (anyone else - please feel free)
ejg_uint_parser_0_0_4_bind_1.cpp
in the following part of Boost Vault, http://tinyurl.com/lro5ok
It's an attempt to crystallise the boo-boo you pointed out. I've
tried to do everything without ghastly global variables - it's also a
salient lesson on const correctness. If that'd been observed in the
first place the iterator cock-up wouldn't have happened.
==================
$ ./ejg_uint_parser
Enter buffer size: 10000
initializing input strings...
Checking that the parsers are functioning correctly...
atoi is behaving itself!
strtol is behaving itself!
qi is behaving itself!
Proceeding to timing tests.Calibrating overhead......done
Timer overhead (t_c) ~= : 117.426
Jitter ~= : 25.9133
qi_parse vs atoi : 86.0764 86.3074 86.4471% faster.
qi_parse vs strtol : 71.9253 72.1881 72.5288% faster.
strtol vs atoi : 8.0502 8.26097 8.47215% faster.
qi_parse vs qi_parse : -0.0274542 0.0393936 0.231944% faster.
All done!
====================
On my platform this is entirely consistent with the simple one-liner
modification you mentioned to the previous code.
Take home message - yes Spirit really *is* faster.
------------------------------------------------
"No more boom and bust." -- Dr. J. G. Brown, 1997
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk