I see all over the forums that “Blueprints are 10x slower than C++”, so my intuition tells me to start replacing blueprints in my projects with C++ code.
But… how is performance actually affected?
Will anything happen if I start replacing random parts of my blueprints with C++ code?
Or is this 10x figure only true for an all-blueprints vs an all-C++ project?
Or are blueprints slower because of the inputs/outputs instead of how they actually work on the inside? This reducing the number of nodes by adding C++ code would help?
i thought that Blueprints WERE C++ code… its my understanding that the code is basically written and adjusted in the background when you edit and change nodes…
i assume that you would be able to merge multiple nodes into code… but aside from that i dont really know
While the statement C++ code runs ~10x faster than blueprints is true, bear in mind that in most simple cases it really doesn’t matter. If you have your blueprints doing simple tasks that end up taking 0.01ms, then turning them into C++ is a huge waste of time. Big time-consuming tasks that take > 0.5ms, like pathfinding algorithms ought to be in C++, but simple gameplay logic and other things Blueprints are commonly used for are fine the way they are.
Back when UE4 first came out I did performance benchmarks using complex algorithms like A*. The results were about 10x faster for C++, but to your statement, the regular uses of blueprints are not nearly as bad. Like the other link says, it depends greatly on what the code is doing. Unfortunately I did my benchmarks on a work-for-hire job so I can’t post results.