Evaluate vs smaller than vs C# component speed difference

A C# script component copies value-types data into a new list with wrapped GH_Types (before and after processing). There are ways in optimizing this. This is the major bottleneck. The next is the fact that it’s a script, which needs to be compiled. The first execution after changing the text will always be slower. So always compute a second time!

Furthermore there is something called branchless programming. Don’t use if and else if not really necessary.

FastCondition.gh (11.8 KB)

6 Likes