Build time and BVH size for different primitive types

To construct a BVH tree, the sphere requires the least amount of data (only 4 float numbers), and I speculate that it has the shortest build time and the smallest memory footprint.
However, the following is the build time and BVH size, where AABB has the shortest build time and the smallest size.
Why is this? Why are the relative build time and BVH size of the three primitives as they are?

The accelerations structure itself is always a bounding volume hierarchy (BVH) and that uses axis aligned bounding boxes (AABB) over each individual primitive and a hierarchy over them.

That means custom primitive AABB build input is the fastest to build and the smallest because neither the AABB needs to be calculated nor any additional geometric primitive data needs to be stored inside the AS.

Generating AABBs over spheres is faster than over triangles because it’s simpler to calculate the AABB and needs fewer memory accesses.

The AS builder for triangle primitives is the most sophisticated of the three since that is the most often used case. More work is done to generate a potentially better BVH.

Also the time to build AS and the memory requirements depend on the AS build flags, AS compaction, and the underlying GPU hardware. Please always provide your system configuration information with such questions.

Please read the OptiX Programming Guide chapters about acceleration structure builds again and look especially at the available AS build flags and the AS compaction chapters.

I would generally not recommend building a world which has extends (0, 0, 0) to (uint32_max, uint32_max, uint32_max) if you can avoid it. That’s a huge unit range and doesn’t help floating point accuracy when actually using that scene for raytracing.