mirror of
https://github.com/boostorg/regex.git
synced 2025-07-16 22:02:08 +02:00
Bring into synch with Trunk, and fix regression.
[SVN r41895]
This commit is contained in:
@ -324,17 +324,17 @@ int main(int argc, char**argv)
|
||||
iters = 10;
|
||||
tim = 1.1;
|
||||
// cache load:
|
||||
regex_tA(&r, s2.c_str(), nsubs, matches.get(), 0);
|
||||
regexecA(&r, s2.c_str(), nsubs, matches.get(), 0);
|
||||
do{
|
||||
iters *= (tim > 0.001) ? (1.1/tim) : 100;
|
||||
t.restart();
|
||||
for(i = 0; i < iters; ++i)
|
||||
{
|
||||
result = regex_tA(&r, s2.c_str(), nsubs, matches.get(), 0);
|
||||
result = regexecA(&r, s2.c_str(), nsubs, matches.get(), 0);
|
||||
}
|
||||
tim = t.elapsed();
|
||||
}while(tim < wait_time);
|
||||
cout << "POSIX regex_tA time: " << (tim * 1000000 / iters) << "us" << endl;
|
||||
cout << "POSIX regexecA time: " << (tim * 1000000 / iters) << "us" << endl;
|
||||
|
||||
if(result == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user