[geos-devel] Coordinate & Coordinate list

David Blasby dblasby at refractions.net
Thu Nov 14 18:09:52 EST 2002


Good points, Martin.

The profing of GEOS seemed to indicate that most of the time was spent constructing and get()ing coordinates.  I think the get() function should be returning pointers to coordinates instead of actual coordinates (which require quite a bit of memory moving and allocation).

The important thing is to *not* return a Coordinate, but a pointer-to-coordinate.

Any word on why there were 250 million Coordinate constructions?

dave
ps. I checked  and Coordinate is only 24 bytes long (I thought there would be a bunch of other information in it for the class and class methods).

pps. you're right about array-of-pointers being less efficient.  I thought they would be more efficient because your memory space wouldnt be chopped-up so much, but after thinking about it, the malloc() free table should be pretty empty.






More information about the geos-devel mailing list