Looks good. LAG does much too much needless copying and memory allocation for my liking. I will open an issue on github to make sure I don't forget to do this.
Berin On 23/08/12 14:45, Mateusz Loskot wrote: > On 23 August 2012 14:39, Martin Isenburg <martin.isenb...@gmail.com> wrote: >> reader->inside_rectangle(fence.getXs()[0], fence.getYs()[0], >> fence.getXs()[1], fence.getYs()[1]); > Speaking of performance, replace > > fence.getXs()[0], fence.getYs()[0], fence.getXs()[1], fence.getYs()[1]); > > with > vector<double> const x = fence.getXs(); > vector<double> const y = fence.getys(); > x[0], y[0], x[1], y[1]); > > and you are 50% of vector<double> copies less. > > As SelectionBox is represented by 4 elements only, std::array would be > cheaper. > > "Every little helps." > > Best regards, <br /> <hr /> <p><font face="Arial" size="1"> Plymouth Marine Laboratory<br /> Registered Office: <br /> Prospect Place<br /> The Hoe<br /> Plymouth PL1 3DH </font></p> <p><font face="Arial" size="1">Website: <a href="http://www.pml.ac.uk">www.pml.ac.uk</a> <br /> <a href="http://www.pml.ac.uk/pdf/PML%20Annual%20Review%202011_2.pdf">Click here for the latest PML Annual Review</a> <br /> Registered Charity No. 1091222<br /> PML is a company limited by guarantee<br /> registered in England & Wales<br /> company number 4178503</font></p> <p><font face="Arial" size="1" color="green">Please think before you print.</font></p> <hr /> <p><font face="Arial" size="1">This e-mail, its content and any file attachments are confidential.</font></p> <p><font face="Arial" size="1">If you have received this e-mail in error please do not copy, disclose it to any third party or use the contents or attachments in any way. Please notify the sender by replying to this e-mail or e-mail fori...@pml.ac.uk and then delete the email without making any copies or using it in any other way.</font></p> <p><font face="Arial" size="1">The content of this message may contain personal views which are not the views of Plymouth Marine Laboratory unless specifically stated.</font></p> <p><font face="Arial" size="1">You are reminded that e-mail communications are not secure and may contain viruses. Plymouth Marine Laboratory accepts no liability for any loss or damage which may be caused by viruses.</font></p> <hr /> <br /> <br /> _______________________________________________ Liblas-devel mailing list Liblas-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/liblas-devel