KDevelop-PG-Location-Table::positionAt updated with new combined relative/binary algorithm

Andreas Pakulat apaku at gmx.de
Mon Oct 26 16:28:45 UTC 2009


On 26.10.09 17:37:31, Milian Wolff wrote:
> On Monday, 26. October 2009 17:07:29 Andreas Pakulat wrote:
> > On 26.10.09 17:13:09, Milian Wolff wrote:
> > > Hey guys,
> > >
> > > just wanted to notify you that I updated the algorithm that is used in
> > > the KDevelop-PG-Qt LocationTable::positionAt method. The old linear
> > > algorithm was of course pretty bad for huge files (i.e. our
> > > phpfunctions.php with its 80k lines).
> > 
> > Nice and btw, of course the linear search algorithm was simply implemented
> > because it was easiest and "fast enough" for the few dummy-usecases we(I)
> > had back then :)
> 
> True, but why did you not use an existing container class?
>  
> > I have to admit though, that I'd sleep better if we could reuse an existing
> > algorithm function like qBinarySearch or one from the stl...
> 
> True, but I've implemented a verify function that showed no differences. So 
> the function should be failsafe.
> 
> Imo we should kill the LocationTable completely and use 
> QVector/QLinkedList/QList or anything else. Maybe even std::vector/deck/list.

I don't think I even wrote that code, it was probably Roberto.. I'll try to
have a look sometime, but probably not during the week (won't be home for
the most part).

Andreas

-- 
Be careful!  UGLY strikes 9 out of 10!




More information about the KDevelop-devel mailing list