Hi, I am doing some profiling with both visual studio 2019 performance profiler and vtune profiler 2022.2.0.
For most functions, vtune and visual studio profiler give consistent results, but there are two functions A and B (both uses SSE and might be inlined), while visual studio profiler always show A is c.a. 50 % faster than B, but vtune always shows B is c.a. 70~80% faster than A in terms of CPU time.
I think both vtune and visual studio profiler are sampling based, but how could they always give the opposite results?
I have repeated the process several times and the results are kind of stable.
PS. I collected all the inputs for A and B and ran them in a separate unit tests for benchmark, the unit test shows A is 40% faster than B, so maybe it vtune is wrong? (but also could due to the difference of runtime between unit tests and real code.)
Thank you for posting in Intel Communities.
Could you please share your Operating system details.
Also share sample reproducer code and the exact commands and steps you followed so that we can reproduce the issue from our end.
sorry for the late reply. That's some internal code which I cannot share. If I extract them out, then it shows as what my unit test says, A is faster than B. I have set to use the same number of samples: 1 sample/ms.
My OS: windows 10 business. Version 21H2. OS build 19044.1826.