Curve Table Look-up vs Maths Func.

Hi All,

I’ve been wondering what the trade-off in performance is between looking up curve table values is as to crunching a function real time. How many arithmetic operations can I get away with before the CT becomes a better option, and are trig / power functions like ln() / exp() comparatively more expensive? (is there any hard and fast rule like X number of multiplications is the limit?)

Cheers,

J

Not sure what type of game you’re making, but I doubt simple math equations are going to be the thing to be concerned about when it comes to performance. Usually in terms of CPU overhead, your game logic is often much more heavy weight, especially things like AI path finding, physics, animation, or the time spend on the CPU to set up the scene graph for the render thread, etc are usually a much bigger factor, so it’s usually more important to focus on optimizing these areas since they usually have the most impact. Also doing things in C++ is always going to be faster than blueprints, and I especially recommend against using “event tick” heavily in blueprints if you’re doing any serious logic.

But your best bet is going to be to use the optimization and profiling tools in UE4 to determine what is fastest, and what areas actually need optimization. I wrote a good summary of these tools and how to use them here:

Achieving good performance and high quality visuals in UE4 through optimization (Draft)

Hope that helps!

  • Joe