[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdegames/atlantik
From:       Simon Hausmann <hausmann () kde ! org>
Date:       2004-01-28 8:21:40
Message-ID: 200401280921.40911.hausmann () kde ! org
[Download RAW message or body]

On Wednesday 28 January 2004 09:02, Rob Kaper wrote:
> On Wed, Jan 28, 2004 at 01:00:53AM +0100, Andy Goossens wrote:
> > > QString::find is faster than ::contains
> > >
> > > -        if (text.contains("rolls"))
> > > +        if ( text.find( QRegExp("rolls") ) != -1 )
> >
> > Even with a useless QRegExp?
>
> It's the "default" method for QString::find, the others are overloaded and
> provided for convenience only, so I assume ::find will at some point have
> to use a QRegExp for its mojo anyway.

For QString it doesn't use QRegExp internally but two different algorithms 
(depending on size) , supposedly faster.

Simon
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic