Skip to content

Optimize - #2347

Merged
TheMarex merged 2 commits into
masterfrom
optimize
May 26, 2016
Merged

TheMarex merged 2 commits into
masterfrom
optimize

Conversation

@TheMarex

@TheMarex TheMarex commented Apr 30, 2016 •

Copy link
Copy Markdown
Member

This needs a cleanup since there is also benchmarking code in there.

85a51b7 brings a real performance boost and 006ce65 cuts longer routes down by ~15ms.

@TheMarex

TheMarex commented May 1, 2016

Copy link
Copy Markdown
Member Author

During this optimization spree I mainly focused on optimizing map matching performance. Key to fast map matching is the coordinate lookup, which used to occupy 85% of the run-time when doing map matching (at least for high-resolution traces).

I used a simple benchmark query on a small dataset, so threat this numbers as relative not real-world values. My test trace went from:

49.3284ms/req at 82 coordinate
0.601566ms/coordinate

To:

26.841ms/req at 82 coordinate
0.327329ms/coordinate

The StaticRTree is still the bottle neck here. ~20% are spend in the actual map matching. ~70% in the StaticRTree, the rest is 5% shortest path for the final route and lots of small change. (note this benchmark excluded step generation and geometry generation)

@oxidase

oxidase commented May 1, 2016

Copy link
Copy Markdown
Contributor

Hi, i have created PR #2348 to make leaf node memory mapped file more system-friendly. util-tests are failing but i can fix it soon.

Comment thread CMakeLists.txt Outdated
endif()
if(CMAKE_BUILD_TYPE MATCHES Release)
message(STATUS "Configuring OSRM in release mode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please make sure to remove this before merging.

(I usually set CXXFLAGS in the env for flags like needed by perf, then I don't have to modify the build system)

@TheMarex

Copy link
Copy Markdown
Member Author

The functional part of this was broken out in #2385. I would like to move my benchmark to src/benchmarks for future reference and then close this.

@daniel-j-h

Copy link
Copy Markdown
Member

=> src/CMakeLists.txt :) modularization comes step by step

@TheMarex TheMarex changed the title [DON'T MERGE] Optimize Optimize May 26, 2016
@TheMarex
TheMarex merged commit 089e60f into master May 26, 2016
@TheMarex
TheMarex deleted the optimize branch May 26, 2016 18:26
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.

3 participants