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.

OLTP Optimization Cheat Sheets for dbdevs and DBAs

September 5, 2017 by “No Bugs” Bunny

Execution Plans with no index, single-column index, and multi-column index

Quote:

Have I already mentioned that you DO need to understand execution plans?

Another Quote:

DO keep in mind that maintaining indexes has its own cost

Filed under: Book: D&D of MOGs1st beta of Vol. VII-IXOn.ProgrammingOptimizations

Read more

Allocator for (Re)Actors with Optional Kinda-Safety and Relocation

August 15, 2017 by “No Bugs” Bunny

Effects of External Fragmentation on Memory Usage

Quote:

Safe with relocation’ mode will allow us to eliminate dreaded ‘external fragmentation’ – which tends to cause quite a bit of trouble for long-running systems

Another Quote:

For a long while, I have been a strong proponent of message-passing mechanisms over mutex-based thread sync for concurrency purposes

Filed under: On.System Architecture(Re)ActorsOn.ProgrammingOptimizations

Read more

Ultra-fast Serialization of C++ Objects

May 16, 2017 by “No Bugs” Bunny

serialization: per-field vs whole struct

Quote:

in both these cases we can be 100% sure that we’ll be deserializing this state on the executable which is identical to the executable which serialized the state.

Another Quote:

Even when comparing with home-grown code with per-field serialization, our Ultra-Fast Serialization still wins (up to 1.5x-2x)

Filed under: On.ProgrammingTips and TricksOptimizations

Read more

Some Big-Os are Bigger Than Others

February 21, 2017 by “No Bugs” Bunny

how to weigh 780 kilos as equal to 1 kilo

Quote:

Strictly speaking, for real-world computers, every algorithm which completes in a finite time can be said to be O(1)

Another Quote:

now the difference because of unfortunate ‘jumps’ over (uncached at the time) memory can lead to a 100x+ (!) performance difference. However, it is still O(1) and is rarely taken into account during performance analysis

Filed under: On.ProgrammingOptimizations

Read more