Some confusion about Unreal Blueprints compiler

So when I was out on the internet looking at some info on AI blueprints, I stumbled onto a article where one of the developers of Unreal said that if you write your decorators in C++ your AI will be significantly faster than if you create your decorators in blueprint form.

This severally hurt my head because I was under the impression that when the Blueprints are compiled that they are converted to C++ and then executed. Is this not the case?

Does that mean that Blueprints are actually some form of interpretive language. Or is it just that Blueprints get their completely independent compiler, which is realatively new, so it’s outputted assembly is not as optimized and that’s why it runs slower than the highly refined C++ compiler. If this is the case, why the heck didn’t they just make it that the compile button just converts it to C++ and then run the C++ compiler to keep everything uniform.

If anyone knows a little more about what the compiler magic is doing in the background that would be great!

There’s some extra stuff that Blueprints create that makes them less efficient than doing the code directly, it’s a product of making a system that’s very flexible.

Blueprints run on a virtual machine. Although with some compiler tricks Epic Games can make them run fast it is just impossible to really be as fast as native C++ code. Look at Epic Games own public blog info about Fortnite development… when they needed maximum speed with the lowest possible overhead they used Blueprints only for the prototyping stage then rewrote the algorithms in C++.

True dat, but you can use Blueprint Nativization for even more performance. Ofc it’s still not as fast as handwritten C++ code, but comes relatively close.