In the new mini-book I cover BVHs. In the book I always went for simple conceptual code figuring people can speed things up later. I have what must be close to a minimum BVH build, but it just gets us the log(N). It picks a random axis, splits in the middle of the list:
here) we don't fully understand why lazy SAH builds work so well. But let's just be grateful. So what IS the most compact top down build? I am going to write one to be supplemental for the book and just sweeping on those qsorts above is what appears best to me, but I invite pointers to good practice.