[geos-devel] Coordinate & Coordinate list (20% faster now)

David Blasby dblasby at refractions.net
Thu Nov 14 19:31:07 EST 2002


>  Coordinate *CoordinateList::getAt(int pos)
>  {
>      if ((pos>vect->size()-1) || (pos<0) )
>           throw "Invalid argument: out of bounds\n" ;
>      else
>          current=pos;
>      return &(*vect)[current];
>  }

Yes - this is exactly what I'm saying.  There's probably a bunch of other
places further "up-stream" that would have to be changed as well (so
you're not copying coordinates there too).

The reason I'm looking at the CoordinateList and copy Constructor  so
hard is because your results say it spent 72% of its time there!

dave





More information about the geos-devel mailing list