I've written multiple custom stats for my HUD and, based on what I read in the forum, I understood that your native if[] syntax behaves similarly to select case(). So I decided to structure everything using select case() for clarity and modularity.
However, when I'm running a session, PT4 warns me that performance is slow and suggests database maintenance. Honestly, I don't mind the slight delay—refreshing takes no more than 7 seconds—but I do know I'm using a large number of custom stats.
Recently, I've started optimizing the stats to eliminate redundant conditions and simplify expressions. A friend mentioned that using the native if[] is more efficient than select case(), especially when performance matters.
Could you confirm whether if[] is indeed faster in practice, and whether it's worth refactoring my stats to use it instead of select case()? Any recommendations for improving performance without sacrificing clarity would be appreciated
