Why is compiling faster with Blueprints?

I have been eager to get into C++ programming but cannot seem to follow the programming tutorials as I don’t understand where the tutors get their code from
(they copy & paste it). Another bit of a turn off for me was compiling took forever, even a simple hot compile where I changed a number from say 1 to 4 would take
1-2 minutes. Now I decided to learn Blueprints since they seemed like a big deal, and the tutorials regarding them seem much more intuitive. I understand much better
how everything works.

Now compiling blueprints takes half a second, even when I make huge changes. I really want to get into C++ programming as I’m not a big fan of visual scripting
as doing simple things can require a lot of nodes (a for loop for example). But again I was turned off by compiling times.

Is there a reason why blueprints compile faster than C++? Aren’t blueprints technically references to C++?

C++ is a large complex language that makes writing compilers a challenge. The current standard is over 1300 pages long. Also UE4 is a large and complex framework with a huge number of classes and struts declared(several thousand). This makes compiling even slower as your code has be checked against all these classes which takes time.

Blueprint is a much simpler language where a lot of the checking is done by the editor when you’re wiring things up. This means the compiler knows the code is correct and simply has to translate it into the internal code that is executed.

Is it possible to make the compiler’s speed as fast as Blueprints?

Epic is working on improving compile times and over time they will get much better. However it’s unlikely that they’ll ever be as fast as a Blueprint compile. It’s simply not the same thing.

Hi Ignite,

With the release of 4.3, you should see a significant decrease in the time it takes to build your code project.

As has been mentioned before, C++ compile times are a really high priority for us, and we are going to keep working hard on it. What Blueprints do is quite different from C++. Rather than compiling down to native machine code, we compile down to a ‘byte code’ which is interpreted at runtime. This is a simpler process, but also results in much (~10x) slower execution speeds. Processing a Blueprint graph is also much easier than C++ code, with all it’s complex language features (headers, templates, macros, linking etc).