Open lucasw opened 3 years ago
Once test has the C++ node at 1.3% cpu and the rust node at 3.0% that are both iterating through pixels in an image then publishing the modified results, need to make them both do more to be better- 10% cpu at least.
It's not just overhead, if I up the frame rate to 10Hz then the C++ node takes 9% cpu and the rust node takes 22%.
Also compare a python node doing the same.
May not have been a good apples-apples test, were both builds in 'release' mode?
That helps a ton, opt level 3 gets the rust node down to 1.7% cpu for the 10Hz image, with the C++ node at 3.0% for -O3
.
[profile.dev]
opt-level = 3
[profile.release]
opt-level = 3
add_compile_options(-O3 -std=c++17)
Maybe that isn't that valuable over existing rosrust_msg tests, but could be a good learning exercise.
Could generate the nodes and the tests to test them?