Closed DMeshkov-HORIS closed 10 years ago
Thanks for the revision! I've merged your changes into the pu branch, and will probably tag a new release shortly. Please take a moment to look at the Polyline-Encoder project. It uses the RecursiveIteratorIterator for array flattening. Ideally both projects should match list/tuple optimization.
Wow! Running benchmarks on large data sets, I'm seeing a consistently large performances improvement by up to 40x.
You`d better use iterator_to_array(new \RecursiveIteratorIterator(new \RecursiveArrayIterator($points)), false) if you want to use SPL, but they are both faster then current version of flatten on large data sets.
Functional style is a bit faster here