Coding performance

I'm sorry for the possible trivial question: in my project there are a lot of switch nodes which detect if the msg.paylod string is equal to certain coded frames. From the performance/speed point of view, is more efficient a switch node, or a function node containing just:

 if (msg.payload === "foo") {
	return msg;
}
return

??
Thanks

The switch node will be more efficient

1 Like

Thanks :+1:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.