Improve C++ primes test (#348)
Improve C++ primes test (#348)

Using map container and make_shared gives noticeable performance boost.
Also prefer [] operator rather than at(), as it has no bounds checking.
The rest of the changes just makes it more C++'y.

Signed-off-by: Radek Szymanski <4e492935a33b356914fe5fcd1d49bf6d2e501e33@pm.me>
kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks