Optix vs Optix Prime rebuild times

Hello Everyone!

I am new to Optix/Optix Prime. I want to use it for ray-casting, so made a small Optix and Optix Prime back-end for testing with a quite big scene with many static and a few dynamic meshes.

With Optix I tried 2 different layouts:

The first one is with instancing (transformations are “baked” for not instanced geometry).
The second is without instancing (transformations, instances are “baked”).

I only update the transformations of the dynamic part of the scene, so I have to mark the root’s and dynamic root’s acceleration structure dirty.

Performance results
Number of iterations: 100
Avg. Scene rebuild: 19.1 ms
Avg. trace: 2.25 ms

Number of iterations: 100
Avg. Scene rebuild: 52.56 ms
Avg. trace: 1.02 ms

Only dynamic:
Number of iterations: 423
Avg. Scene rebuild: 2.45863 ms
Avg. trace: 0.0591017 ms

The main problem is the rebuild time. Based on these numbers I thought rebuilding the Root group costs too much, so I removed the Root Group and traced the static and dynamic parts of the scene separately. However the rebuild times were similar. After profiling with nSight I observed some copying/blocking (copying 8MB for 8 ms) in the background, but I’m not sure.

I also implemented an Optix Prime back-end and managed to build a similar structure for the same scene. With the Optix Prime back-end I got pleasing rebuild times for the dynamic part (around 2 ms) with the static part loaded.

I would like to use Optix in the future, knowing that Optix Prime won’t be getting RTX support.
So my question is: what did I do wrong? :D

EDIT: Tests were run on a GTX 1080