Hi Simon, Ulrich and community members, Please see comments below. Thank you very much for the feedback. Special thanks Simon for suggesting something I explored in GDB codebase. >> This last part seems racy to me. In principle, it is possible >> that one thread terminated and simultaneously one new thread was >> created, since the last time we stopped. In this case, the thread >> count would be the same, but the thread list still incorrect. >> >> Given the other test for single-stepping, is this particular >> check even still resulting in a noticeable performance >> difference? Thanks Ulrich. In v3 version of the patch I have made sure we use only single step and no counts are used to save time. It is something I did not think of. >I would suggest making a patch with just the get_signaled_thread batch >change first, since that one looks fairly safe and low hanging fruit. >Then, measure again and then look for the next optimization. >I would suggest using the "scoped_time_it" class to measure the >execution time of various functions and scopes. This object measures Thanks Simon, In 2nd and 3rd patch of the coming series I have done the same. Sending the patch with this data in the commit message. Have a nice day ahead. Thanks and regards, Aditya.