11 Oct 18:10
Re: Geometry and spatial indexes, my opinion
Mathias Gaunard <mathias.gaunard <at> ens-lyon.org>
2008-10-11 16:10:45 GMT
2008-10-11 16:10:45 GMT
Brandon Kohn wote: > If so, how does direct iteration compare with index > operator accesses? I've noticed in my own tests on measuring std::vector > accesses that iteration is significantly faster than operator [ ] when > you are iterating over the container (presumably due to bounds checking). operator[] doesn't do bounds checking, unless you have the debug/secure mode of your standard library enabled (which is on by default on MSVC). While access by index is theoretically slower than pointer increments, I'm pretty sure any compiler optimizes the former to the latter. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
RSS Feed