« April 2014 | July 2014 Archives | August 2014 »

Practical Testing: 32 - Intrusive containers.

| 0 Comments
Back in 2004, I wrote a series of articles called "Practical Testing" where I took a piece of complicated multi-threaded code and wrote tests for it. I then rebuild the code from scratch in a test driven development style to show how writing your tests before your code changes how you design your code. Since the original articles there have been several bug fixes and redesigns all of which have been supported by the original unit tests and many of which have led to the development of more tests. In 2010 I needed to improve the performance of the code…

Practical Testing: 33 - Intrusive multi-map.

| 0 Comments
Previously on "Practical Testing"... I'm in the process of replacing STL containers with custom intrusive containers in the timer system that I have been developing in this series of articles. The idea is that the intrusive containers do not require memory operations for insertion or deletion as the book-keeping data required to store the data in the container has been added to the data explicitly. This reduces the potential contention between threads in the application and, hopefully, improves overall performance. In the last instalment I showed how my usage of std::set in the timer wheel code could be replaced by…

Intrusive C++ containers

| 0 Comments
Recently, whilst continuing to improve the performance of various aspects of The Server Framework, I reached a point where I found I needed to replace some STL containers with intrusive containers which didn't need to perform memory allocations during data insertion and removal. I had been toying with the idea of implementing custom containers for some time but have only recently had a pressing need for them. The STL provides some marvellously usable code which has changed the way people view container classes in C++. The result is that you hardly ever need to write your own containers as the…
There are a couple of undocumented Visual Studio compiler switches which can be useful occasionally: /d1reportSingleClassLayout - which produces a dump of the in memory layout of a given class /d1reportAllClassLayout - which does the same for ALL classes See here and here for more details. And if you liked that, you might find this collection of debugging tricks interesting.…

Efficient Multi-Threading

| 0 Comments
Performance is always important for users of The Server Framework and I often spend time profiling the code and thinking about ways to improve performance. Hardware has changed considerably since I first designed The Server Framework back in 2001 and some things that worked well enough back then are now serious impediments to further performance gains. That's not to say that the performance of The Server Framework today is bad, it's not, it's just that in some situations and on some hardware it could be even better. One of the things that I changed last year was how we dispatch…
« April 2014 | July 2014 Archives | August 2014 »

About this Archive

This page is an archive of entries from July 2014 listed from newest to oldest.

April 2014 is the previous archive.

August 2014 is the next archive.

I usually write about C++ development on Windows platforms, but I often ramble on about other less technical stuff...

Find recent content on the main index or look in the archives to find all content.

I have other blogs...

Subscribe to feed The Server Framework - high performance server development
Subscribe to feed Lock Explorer - deadlock detection and multi-threaded performance tools
Subscribe to feed l'Hexapod - embedded electronics and robotics
Subscribe to feed MegèveSki - skiing