[#3225] Added benchmark
[#3225] Various optimisations