Rendering big triangle meshes faster

I’m new to optix, and so far I have managed to render out a triangle mesh, with no real shaders or anything, just simply assigning the normal vector to the color of the pixel.

The issue is that it’s really slow.
Like I know ray tracing isn’t a fast algorithm, but in my previous ray tracing endeavors, I actually rendered out the same model with textures and shadow rays like 8 times faster with native C++ code only.

The c++ code has a KD tree attached to the model.
And as far as I can tell that’s not something optix would support natively.
Like I added an acceleration structure to my geometry group, but since it only has one geometry I imagine that doesn’t do much.

So the question is, how could I make the rendering of this one geometry of like a hundred thousand triangles faster?

If you’re new to OptiX I would recommend to watch the OptiX Introduction presentation and work though the accompanying example sources.
Those even contain exactly the experiment you’ve done in example optixIntro_03.
All necessary links in this thread:

Recommended development environment under Windows: OptiX 5.1.0, CUDA 9.0, MSVS 2015.
If you’re using MSVS 2017 and CUDA 9.2 you’re potentially running into these issues:
which need CUDA_HOST_COMPILER be set differently and a CUDA header hacked at your own risk.

Oh wow, I totally misunderstood how the AABB function was supposed to work. My bad.

Okay, now the optix program finished twice as fast as my old program, but still with less features, and it’s still not real time viable.
I suppose I’ll just have to use smaller meshes. :(