Made optimizations in randomization part, updated common.mk to use O3 optimization level. Made optimization in counting initial count of triangles.