Feb 142014
 

I have published my very first project on GitHub: Allocator Builder

From the summary:

A highly composable, policy based C++ allocator based on ideas from Andrei Alexandrescu, presented at the C++ and Beyond 2013 seminar.

The background behind the idea is to compensate the main problem of ::malloc() and the other standard allocators, the separation of memory pointer and the allocated size. This makes it very difficult for all kind of allocators to handle in a fast way memory allocations and deallocations.

 

Sep 212013
 

During the last weeks I spend some time in optimizing a C++ string class that we use in our application. You may ask, why one should spend time today in writing ones own string class. There are already so many available for C++ like std::string and QString.

Many years ago we decided to implement because of different reasons our own string class in C++. One reason was that we have to handle very often UIDs in our domain – medical applications. They have a maximum length of 64 chars. ┬áThe Visual Studio’s STL implementation is highly optimized for strings with a max length of 16 bytes. So we decided that our class should have a chunk of 128 bytes to avoid unnecessary additional heap allocations.

Continue reading »