← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: Raytracing - a more pleasing way sequencing blocks to render ?

 

On 01/05/2019 10:53, Mário Luzeiro wrote:
Hi Henner,

I didn't get a chance to test the patch yet but
I was thinking adding another options to implement some kind of spiral rendering from the center :) (as usually the board is centered)

Assuming the reason for the Morton code in the existing code is to improve cache locality, it should work pretty well - each block is near the previous one, though not as good as the Morton code, because we will go around and do some "far" blocks before doing "near" blocks on the next loop out, wasting/recaching some items.

However, as a fun test, this sort functor actually produces *better* speeds (24s vs 25s)

    [&](const SFVEC2UI &a, const SFVEC2UI &b){ return !!(rand() % 2); }

So jumping around the blocks randomly actually *improves* speed. I don't know why!

Cheers,

John


Follow ups

References