Optimizations

Premature and/or over-optimization is often claimed to be a root of most evil in the programming world. However, what to do when optimization IS necessary?

IT Hares discuss certain not-so-trivial optimization techniques. It doesn’t mean that you should use them at all costs (and most likely, you don’t); however, if you do have a reason to optimize – this information may be handy.

Testing Memory Allocators: ptmalloc2 vs tcmalloc vs hoard vs jemalloc While Trying to Simulate Real-World Loads

July 4, 2018 by “No Bugs” Bunny

malloc-cpu.png

Quote:

if you DO want to get performance from changing mallocs, make sure to test them with your own app

Another Quote:

in our humble opinion, overall winner so far (by a nose) is jemalloc.

Filed under: On.ProgrammingOptimizations

Read more

The Curse of External Fragmentation: Relocate or Bust!

June 21, 2018 by “No Bugs” Bunny

freed_pages_32_and_128_per_page.png

Quote:

We won’t ever get (almost) any virtual memory back, plain and simple

Another Quote:

relocation allows not only to reduce fragmentation, but to eliminate it entirely.

Filed under: On.ProgrammingOptimizations

Read more

‘Speedy Gonzales’ Serializing (Re)Actors via Allocators

May 1, 2018 by “No Bugs” Bunny

Serializing Allocators

Quote:

Allocator-based serialization for (Re)Actors is extremely fast (for x64 – around tens of ms per 100MB of state)

Another Quote:

Per-(Re)Actor allocators can be implemented without any changes within (Re)Actor itself (i.e. all the necessary changes can be confined to Infrastructure Code).

Filed under: On.ProgrammingProgramming LanguagesOptimizations

Read more

Parallel STL for Newbies: Reduce and Independent Modifications

April 26, 2018 by “No Bugs” Bunny

Parallel Programming: Good Way and Bad Way

Quote:

with std::reduce() such code, while it compiles at least under MSVC, MAY occasionally provide wrong results

Another Quote:

if you happen to need something beyond that – take a deep breath and allocate at least several months to understand how does parallelism really work under the hood.

Filed under: On.ProgrammingTips and TricksOptimizations

Read more