Closed yakir12 closed 10 months ago
In https://github.com/JuliaImages/ImageDraw.jl/blob/8b2a4f125cdaf4031b2e72755910ee39b094fccc/src/ellipse2d.jl#L18 we collect indices to later iterate over and draw (here). Why not skip the collection and just draw right there and then inside the loop?
It would avoid dynamically allocating x and y.
x
y
If there's no reason not I can PR and benchmark.
I went ahead and tried it out, looks pretty promising...
In https://github.com/JuliaImages/ImageDraw.jl/blob/8b2a4f125cdaf4031b2e72755910ee39b094fccc/src/ellipse2d.jl#L18 we collect indices to later iterate over and draw (here). Why not skip the collection and just draw right there and then inside the loop?
It would avoid dynamically allocating
x
andy
.If there's no reason not I can PR and benchmark.