kd tree sah