Skip to content

Comments

Simplify geometry handling switch statement#45

Merged
mapsam merged 2 commits intomasterfrom
simplify-geometry-handling
Dec 4, 2017
Merged

Simplify geometry handling switch statement#45
mapsam merged 2 commits intomasterfrom
simplify-geometry-handling

Conversation

@mapsam
Copy link
Contributor

@mapsam mapsam commented Dec 1, 2017

Adds a suggestion from @springmeyer in #42

Benchmarks look about the same 👍

HEAD

1: pip: many building polygons ... 957 runs/s (1045ms)
2: pip: many building polygons, single layer ... 1027 runs/s (974ms)
3: query: many building polygons, single layer ... 920 runs/s (1087ms)
4: query: linestrings, mapbox streets roads ... 1698 runs/s (589ms)
5: query: polygons, mapbox streets buildings ... 940 runs/s (1064ms)
6: query: all things - dense single tile ... 489 runs/s (2045ms)
7: query: all things - dense nine tiles ... 65 runs/s (15446ms)
8: elevation: terrain tile nepal ... 759 runs/s (1318ms)
9: geometry: 2000 points in a single tile, no properties ... 2203 runs/s (454ms)
10: geometry: 2000 points in a single tile, with properties ... 1761 runs/s (568ms)
11: geometry: 2000 linestrings in a single tile, no properties ... 1115 runs/s (897ms)
12: geometry: 2000 linestrings in a single tile, with properties ... 959 runs/s (1043ms)
13: geometry: 2000 polygons in a single tile, no properties ... 667 runs/s (1500ms)
14: geometry: 2000 polygons in a single tile, with properties ... 248 runs/s (4026ms)

master

1: pip: many building polygons ... 978 runs/s (1023ms)
2: pip: many building polygons, single layer ... 1048 runs/s (954ms)
3: query: many building polygons, single layer ... 918 runs/s (1089ms)
4: query: linestrings, mapbox streets roads ... 1706 runs/s (586ms)
5: query: polygons, mapbox streets buildings ... 915 runs/s (1093ms)
6: query: all things - dense single tile ... 507 runs/s (1974ms)
7: query: all things - dense nine tiles ... 66 runs/s (15261ms)
8: elevation: terrain tile nepal ... 729 runs/s (1371ms)
9: geometry: 2000 points in a single tile, no properties ... 2137 runs/s (468ms)
10: geometry: 2000 points in a single tile, with properties ... 1704 runs/s (587ms)
11: geometry: 2000 linestrings in a single tile, no properties ... 1085 runs/s (922ms)
12: geometry: 2000 linestrings in a single tile, with properties ... 970 runs/s (1031ms)
13: geometry: 2000 polygons in a single tile, no properties ... 657 runs/s (1522ms)
14: geometry: 2000 polygons in a single tile, with properties ... 231 runs/s (4329ms)

Copy link
Contributor

@springmeyer springmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Per benchmarks, yes I would not assume this would change anything - only motivated by reducing lines of code.

@mapsam mapsam merged commit 18b682b into master Dec 4, 2017
@mapsam mapsam deleted the simplify-geometry-handling branch December 4, 2017 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants