This content has been marked as final. Show 3 replies
Rodney_McKay wrote:ok but if i do some image processing work like finding edges i got to iterate through the buffer...
The fastest way is to keep all the pixels in one big buffer (the same way as BufferedImage works).
this is maybe slower using a normal array instead of an instance of Iterator who cares about the current
A loop through a buffer with simple math calculations to find the correct pixel (x,y) is always faster than using complex data structures.
This makes it easy for the JVM to optimize your code performance.
Anyway the overhead of using data structures is much bigger than any extra value they give.