I am using Visual Studio Code + C/C++ extension to debug my project. I refactored my project to use Workspace so that sub modules are libraries. When I run my code in release profile it takes 0.1 mins and if I run in debug profile it takes whooping 5 mins. I am using rayon with
num_thread(1) for both debug and release profile (I did this for monitoring the performance and easy to use breakpoints). Also, my code has lot of
I tried changing my profile like below,
[profile.dev] opt-level = 3
It is fast but it doesn't stop at breakpoints. I tried
level 2 but it optimised lot of variables. Then I tried
level 1 and that is still slow.
Is there any cargo option to increase compile time and reduce execution time without optimising out variables?
Also if there is a way to dynamically change the
num_thread, that should also be fine I guess
currently I am using this,