Skip to content

great-circle distance speedups - #224

Merged
jteresco merged 4 commits into
TravelMapping:masterfrom
yakra:trig
Jun 7, 2019
Merged

great-circle distance speedups#224
jteresco merged 4 commits into
TravelMapping:masterfrom
yakra:trig

Conversation

@yakra

@yakrayakra commented May 19, 2019

Copy link
Copy Markdown
Contributor

C++: store & retrieve segment length

Increases speed slightly when Computing stats & Creating per-traveler stats logs.
Along for the ride: added alternate great-circle distance formulas to Waypoint::distance_to & PlaceRadius::contains_vertex, commented out for now

yakra added 3 commits May 19, 2019 01:50
Increases speed slightly when Computing stats & Creating per-traveler stats logs.
Along for the ride: added alternate great-circle distance formulas to Waypoint::distance_to & PlaceRadius::contains_vertex, commented out for now
Increases speed when Creating per-traveler stats log entries and augmenting data structure.
Along for the ride: added alternate great-circle distance formulas to Waypoint.distance_to & PlaceRadius.contains_vertex, commented out for now
@yakrayakra changed the title C++: store & retrieve segment lengthstore & retrieve segment lengthJun 3, 2019
@yakrayakra added the speed label Jun 3, 2019
@yakra

yakra commented Jun 3, 2019

Copy link
Copy Markdown
ContributorAuthor

http://forum.travelmapping.net/index.php?topic=3014.msg13843#msg13843
Added a commit to implement this in siteupdate.py.

On noreaster:

  • Reading waypoints for all routes 116.9 -> 120.1 s, gaining 3.2 s.
  • Computing stats 30.1 -> 26.1 s, losing 4.0 s.
    Let's call this moving 3.6+/-0.4 s from point A to point B. Times always seem to vary a little bit between runs in Python (for example, the total run time for all tasks other than the ones I measured for this benchmark went 260.2 -> 254.8 s); there will be a little noise in the signal.
  • Creating per-traveler stats logs and augmenting data structure 46.2 -> 29.9 s. A 50% speedup for this task.

@yakra

yakra commented Jun 3, 2019

Copy link
Copy Markdown
ContributorAuthor

Spherical law of cosines formula for area graphs

253f752http://forum.travelmapping.net/index.php?topic=3014.msg13996#msg13996

Same as the existing formula, but with some terms factored out or simplified via trig identity.
Increases area graph generation speed by ~32%.

  • Not such a big deal in C++ on BiggaTomato, where it gets us from 3.7 to 2.8 s.
  • In Python on noreaster, we go from 56.8 to 43.1.

No DIFFs in the resulting graphs.

@yakrayakra changed the title store & retrieve segment lengthgreat-circle distance speedupsJun 3, 2019
@jteresco

Copy link
Copy Markdown
Contributor

Sorry I forgot this was here. Pulling in now and it will be used starting with tomorrow's site update. And thanks again for all the work on this.

@jteresco
jteresco merged commit d8b0c0e into TravelMapping:masterJun 7, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yakra@jteresco