Added variant for gperftools profiler
Some optimizations on intersection calculation