Description

The macros LLM and LLM_IF_ENABLED behave identically but are slightly different from a performance standpoint. For consistency all allocs and frees should use the same one. Measure the cost of a cook on our large internal project and remove LLM_IF_ENABLED if it is not useful or convert all allocs and frees to LLM_IF_ENABLED if it is.

They behave identically because OnLowLevelFree and OnLowLevelAlloc, like all LLM functions (maybe a few exceptions) early exit if bIsDisabled.

LLM_IF_ENABLED was added in CL 4114133 as a performance improvement along with some other changes to bIsEnabled. Other things have changed since then so it's possible the LLM_IF_ENABLED macro is no longer useful for performance. The only reason it might be useful is to avoid the cost of the function call.

Steps to Reproduce

N/A - minor performance change only

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-200297 in the post.

0
Login to Vote

Fixed
Fix Commit30479895
Main Commit30479895
CreatedNov 13, 2023
ResolvedJan 8, 2024
UpdatedJan 20, 2024