
18 Nov
2010
18 Nov
'10
6:13 p.m.
Hi, does anyone know, why boost::this_thread::get_id() is about 60 times slower than PR_GetCurrentThread(). boost version : 1.42 platform and os : 32bit, win xp sp3 compiler : msvc8 lib : boost_thread-vc80-mt-p-1_42.dll measured : 10 million executions of PR_GetCurrentThread and boost::this_thread::get_id(), where the latter took 1.5s and the previous only 75ms. Both measures with high performance counter from outside the loop and assignment to vector, to avoid optimizations by compiler. What makes this so ridiculous, is that boost::thread_specific_ptr performans quite well, as fast like PR_GetCurrentThread. Do I ignore some implementation or optimization intrinsics ? Greetz, Ingo.