# UE4 V.S. 100 Billion+ arithmetic calculation simulation

**URL:** <https://forums.unrealengine.com/t/ue4-v-s-100-billion-arithmetic-calculation-simulation/127171>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [June 7, 2019, 12:00am UTC](https://forums.unrealengine.com/t/ue4-v-s-100-billion-arithmetic-calculation-simulation/127171 "2019-06-07T00:00:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_68944a37](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_68944a37](https://forums.unrealengine.com/u/anonymous_user_68944a37)\
**Post date:** [June 7, 2019, 12:00am UTC](https://forums.unrealengine.com/t/ue4-v-s-100-billion-arithmetic-calculation-simulation/127171/1 "2019-06-07T00:00:30Z")

</div>

So I have my project mostly up and running In UE4, but the problem is that it’s running a little slow to be of much use to me: About 50,000x too slow to be exact ☹

The Question is, should I scrap the project in UE4 and attempt to learn C++ and rebuild from the ground up, or would “partial C++” (don’t know how to do this, but i’ve heard Epic does it for some of their game features) work for handling the bulk arithmetic, but keep the ease of blueprints (which I can actually understand to some degree) for things such as writing to and reading from data tables, basic logic flow etc.

other concerns would be:

1. Would UE4’s infinite loop detection still apply to C++ code, forcing me to keep my small periodic delay running? (I set a 0.00000001 delay periodically to prevent the detection, but I suspect it might be rounding it up to 0.001 or something much longer)

2. Even If I do learn C++ and get this together, would I still be lacking the “optimization” skills to make it run as fast as I would want it to?

3. If I have to end up paying someone to optimize it, are there people who can convert UE4 projects into C++ and optimize?  
what do you think the cost would be? This is a personal project that I have no intention of distributing.

Thanks in advance for whatever information or advice you can give!

---

<div class="post-metadata">

**Author:** ![Jinc](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jinc/32/750897_2.png) [@Jinc](https://forums.unrealengine.com/u/Jinc)\
**Post date:** [June 9, 2019, 5:54am UTC](https://forums.unrealengine.com/t/ue4-v-s-100-billion-arithmetic-calculation-simulation/127171/2 "2019-06-09T05:54:17Z")

</div>

Partial blueprint is writing a method in C++ (using a UPROPERTY(BlueprintCallable) macro) and then calling it from BP as opposed to doing everything in C++. I cannot say if converting it to C++ would be an instant fix for the issue as I don’t know what is causing the slowdown but it will speed it up significantly. First thing I would suggest is moving everything out of tick that you can and instead, set a timer with a delay instead.

1. You should never use a delay in C++ to stop an infinite loop, if you are then something is wrong with the code
2. You won’t know until you try but once you step into the C++ world, stackoverflow will be your friend.
3. They exist but aren’t cheap; I would recommend using the forums to ask questions (or stackoverflow)

---

<div class="post-metadata">

**Author:** ![ExtraLifeMatt](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/extralifematt/32/918695_2.png) [@ExtraLifeMatt](https://forums.unrealengine.com/u/ExtraLifeMatt)\
**Post date:** [June 9, 2019, 2:32pm UTC](https://forums.unrealengine.com/t/ue4-v-s-100-billion-arithmetic-calculation-simulation/127171/3 "2019-06-09T14:32:29Z")

</div>

If you need to run something 100B+ times, you’re probably going about the problem incorrectly. What are you trying to do?
