So, in the previous post I talked about, fast_remove_if, and going faster than the std::remove_if function. Now there is a further improvement that can be made to go *even* faster, but with no need to modify any functions – instead it involves modifying the alignment of the data in the vector. Here’s the object weContinue reading “Going Faster With Alignment”
So you may know about the “erase, remove_if” method of removing elements from a vector. Looks like this: This operation is an order-preserving operation, and “slow” if we don’t care about preserving the order. To remove stuff from an array quick, without preserving the order, you may have heard of something called, swap-remove. That’s whenContinue reading “fast_remove_if”
What the basics of c++ are actually doing under the hood.
I feel like when it comes to C++ there is a lot of misunderstanding of what it is, what it can be and how it should be. The average programmer just doesn’t know C++ very well, even though they may use it a lot. C++ is huge and old, has legacy stuff and brand newContinue reading “Spot C++”