Unnested loop and accurate timer

Separated the nested loop for cost computing to two loops. Set a timer around new build node allocating before building the large AABB.