Faster Dlang Execution

seany seany at uni-bonn.de
Tue Jun 8 22:04:26 UTC 2021


On Tuesday, 8 June 2021 at 18:03:32 UTC, H. S. Teoh wrote:

>
> But more importantly, if you can elaborate a bit more on what 
> your program is trying to do, it would help us give more 
> specific recommendations. There may be domain-specific 
> optimizations that you could apply as well.
>
>
> T


Hi

The program is trying to categorize GPS tracks.
It has to identify track that count as (somewhat) parallel (this 
is difficult to define) .

So I draw lines through points that have at most 5 m (as measured 
by vicenty -'s formula) RMS error from the trend line. Then i 
look for lines that can be considered "turn lines" ( a turn 
joining two parallel lines).

Then I draw a best fit boundary around it. I lay a square grid, 
and remove the squares where no line can be found.

Then I use this algorithm :
https://stackoverflow.com/questions/50885339/polygon-from-a-grid-of-squares

This runs at O(N²) for sure.

Does this help?



More information about the Digitalmars-d-learn mailing list