Niall’s virtual diary archives – Friday 12th December 2014

by . Last updated .

Friday 12th December 2014: 3.15am. Location: Dromahane.

Last day of work for me in 2014 is tomorrow, and this Monday we depart to the States for Christmas. Despite not getting many paid hours in these last few weeks (Megan is sick so I get extra Clara duty, and I'm not feeling particularly well myself either, I have a sore throat and I haven't been able to breath well through my nose for some weeks), I raised a comprehensive build test matrix for Boost Thread this week. No less than thirty build targets out of ninety have problems currently, though it's only a few causes appearing repeatedly. As much as it feels like I haven't accomplished much in December other than spending an awful lot of money on annual bills like insurance (multiple kinds) and waste collection, I think maybe that build matrix may well prove very useful in the long run, not least that I think it is probably reusable for any Boost library. And that is very interesting long run ...

In my spare hours I tried integrating proposed boost concurrent_unordered_map into AFIO and was quite shocked to find it halves the performance despite being totally mutex free, and therefore AFIO's core engine becomes usually lock and wait free. I reckon it possible to raise that to maybe a 25% performance drop, but seeing as I had expected it to go faster I was quite disappointed. The weird thing is that concurrent unordered map is within ten percent of std unordered map single threaded, so where the half performance comes from is currently a mystery, and I can only assume it's cache line contention somewhere. I may yet be able to pull a rabbit from the hat though because with the new concurrent unordered map you can detach and insert items without destroying them, and I'm thinking one could therefore recycle items and avoid a good deal of memory allocation and object construction/destruction. I'm also thinking that some spinlock spin count tuning might be a wise idea as I'm currently using the old spin count tuning. All that said though, a quick run through valgrind callgrind showed most of the cycles going on scanning the bucket for entries, so I may need to tweak the bucket count and density in memory. I'm currently setting equal performance to a spin locked std unordered map as my gold standard goal! It's certainly not a bad thing to do while watching TV at night, debugging involves a lot of tedious trial and error made a lot better by a not too involving TV show on in the background.

#boostcpp #c++

Go back to the archive index Go back to the latest entries

Contact the webmaster: Niall Douglas @ webmaster2<at symbol>nedprod.com (Last updated: 2014-12-12 03:15:13 +0000 UTC)