On.Programming

For most of us, programming (or more generally – software development) is all the life is about.

IT Hares are not different. And they have more than just quite a few bits to share about programming…

Java vs C++: Trading UB for Semantic Memory Leaks (Same Problem, Different Punishment for Failure)

October 30, 2018 by “No Bugs” Bunny

C++ vs Java: UB vs Semantic Memory Leaks

Quote:

with all due disrespect to mutable static/global data, I have to say that the problem of semantic memory leaks is NOT restricted to statics

Another Quote:

semantics of good code is about the same regardless of Java/C++ choice

Filed under: On.ProgrammingProgramming Languages

Read more

C++: "model of the hardware" vs "model of the compiler"

October 3, 2018 by “No Bugs” Bunny

BB_emotionM_0027b.png

Quote:

we MUST NOT care about compiler internals beyond our task definition (which is based on (a) humans, and (b) hardware, that’s it).

Another Quote:

My problem with introducing a ‘model of the compiler’ into the picture, is that it can be used to justify pretty much anything without any relation to real-world requirements.

Filed under: On.ProgrammingProgramming LanguagesOn.DevelopmentDevelopment Philosophy

Tagged With: C/C++
Read more

CAS (Re)Actor for Non-Blocking Multithreaded Primitives

July 23, 2018 by “No Bugs” Bunny

nano-(Re)Actors exchanging messages

Quote:

in 2017, I started to feel that the Dark Ages of mutex-based thread sync were over

Another Quote:

Another issue which almost universally rears its ugly head when speaking about not-so-trivial uses of CAS is the so-called ABA problem.

Filed under: On.System Architecture(Re)ActorsOn.ProgrammingTips and Tricks

Read more

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