Quote:
I am trying to figure out fastest method for building a mosaic of sorts from the dataset
Don't!
Don't try to find fastest algorithm from scratch, never.
As you are new to this problem, you need to understand how it work.
How to solve the problem:
- First build a solution, don't care about performance.
- Run your program with small datasets and improve the program until result have expected quality.
- Use profiler to understand where program spend time and why.
- Once see where program is doing same thing again and again, think about how you can improve this point.
- Go back to profiler and improve incrementally.
The other solution is to find full blowup algorithm on internet.
Let guess that you will learn much more with first method.
Profiling (computer programming) - Wikipedia[
^]