mapbox / mapnik-vector-tile

Mapnik implemention of Mapbox Vector Tile specification
BSD 3-Clause "New" or "Revised" License
553 stars 117 forks source link

Using SSE SIMD in Simplification #209

Closed flippmoke closed 6 years ago

flippmoke commented 8 years ago

A speed improvement in the simplification code by using SSE code.

Master Bench

./build/Release/vtile-encode ./test/geometry-test-data/benchmark/ginormous-polygon.json 0 0 0 -i 100 -p 4326
z:0 x:0 y:0 iterations:100
5421.31ms (cpu 5407.38ms)   | encode tile: ./test/geometry-test-data/benchmark/ginormous-polygon.json

Pull Request Bench

./build/Release/vtile-encode ./test/geometry-test-data/benchmark/ginormous-polygon.json 0 0 0 -i 100 -p 4326
z:0 x:0 y:0 iterations:100
3009.47ms (cpu 2998.82ms)   | encode tile: ./test/geometry-test-data/benchmark/ginormous-polygon.json

/cc @springmeyer @artemp @jakepruitt

pnorman commented 8 years ago

Will this continue to work on non-x86 platforms?

flippmoke commented 8 years ago

@pnorman if we decided to accept this pull request we could add a compile flag to use the original functionality. It should work just fine on x64 as well

pnorman commented 8 years ago

cc @sebastic since I think he's packaging mapnik-vector-tile on other CPUs

sebastic commented 8 years ago

The mapnik-vector-tile source package builds an architecture independent binary package, so the build is only performed on the architecture of the build system which is amd64 in my case. The node-mapnik package may be affected by this if it's arch:any, it's the reason we have mapnik-vector-tile packaged.

flippmoke commented 8 years ago

After latest commit:

./build/Release/vtile-encode ./test/geometry-test-data/benchmark/ginormous-polygon.json 0 0 0 -i 100 -p 4326
z:0 x:0 y:0 iterations:100
2959.72ms (cpu 2936.32ms)   | encode tile: ./test/geometry-test-data/benchmark/ginormous-polygon.json
pnorman commented 6 years ago

This PR seems oddly large, like a merge or rebase screwed up

flippmoke commented 6 years ago

@pnorman a screw up in a rebase

flippmoke commented 6 years ago

Closed in favor of #268