Closed martinfrances107 closed 3 years ago
I want to ask questions about the performance of my own work... so I have created a side issue
talking about a uniform approach to bench marking https://github.com/Fil/d3-geo-voronoi/issues/28
I didn't understand the "double looping" you mentioned
Ah, by "double looping"
I mean a simplistic implementation of "Array.from" would have a iterator or a for loop , looping over all elements
and then the .map() would have a similar but distinct for loop iterating over all elements ...
So ... your solution neatly steps over my "loop twice" argument
Thanks you for correcting me.
gotcha! I was looking for a nested loop 👍
This is a discussion point for this issue
https://github.com/Fil/d3-geo-voronoi/issues/26
The change is to use "Set" as a semantically more meaningful data structure.
BUT to avoid a BC break it has a double looping structure which may degrade performance.