Re: Performance improvement

2025-05-25 Thread Thiago Macieira
On Thursday, 22 May 2025 22:58:37 Central Daylight Time Igor Mironchik wrote: > PASS : Test::initTestCase() > PASS : Test::test_func() > RESULT : Test::test_func(): > 0.35 msecs per iteration (total: 75, iterations: 2097152) > PASS : Test::test_template() > RESULT : Test::test_templ

Re: Performance improvement

2025-05-25 Thread Thiago Macieira
On Thursday, 22 May 2025 11:21:03 Central Daylight Time Igor Mironchik wrote: > inline long long int > skipSpaces(long long int i, const QString &line) > { > return skipIf(i, line, [](const QChar &ch){ return ch.isSpace(); }); > } > > Do you know a way to optimize it? In addition to what oth

Re: Performance improvement

2025-05-22 Thread Jin Liu
Igor Mironchik 于2025年5月23日周五 00:21写道: > > Hi. > > I'd like to ask you, guys, maybe I'm a dumb a little, and you know how > to optimize a following function. > > inline long long int > skipIf(long long int startPos, const QString &line, > const std::function &pred, > long long int e

Re: Performance improvement

2025-05-22 Thread Konstantin Kharlamov
On Thu, 2025-05-22 at 19:21 +0300, Igor Mironchik wrote: > Hi. > > I'd like to ask you, guys, maybe I'm a dumb a little, and you know > how > to optimize a following function. > > inline long long int > skipIf(long long int startPos, const QString &line, >     const std::function &pred, >   

Re: Performance improvement

2025-05-22 Thread Sune Vuorela
On 2025-05-22, Igor Mironchik wrote: > Hi. > > I'd like to ask you, guys, maybe I'm a dumb a little, and you know how > to optimize a following function. I don't understand the requirements. Can you provide 10 sets of input/output ? /Sune