total event counter, optimizations, trying to get the throughput higher