LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Class vs Variant/Enum in a QSM

I'm wondering if there are performance differences between a class-based QSM and a variant/enum QSM.  To clarify, are there any glaring differences between sending a cluster with an enumerated state and variant into a consumer queue, and sending just a class that dictates what state will run?  Or is it all preferencial?  Are there particular situations where one would work better than the other?

0 Kudos
Message 1 of 3
(2,437 Views)

Not that easy to answer.

Steve Chandler has been doing a benchmark Performance of state machine with enum vs string. His target was to get maximum speed of a state machine.

 

0 Kudos
Message 2 of 3
(2,407 Views)

Huh, interesting.  It'd kind of make me think that performance-wise enum/variant would win versus a class, but I'm not sure how reading data from a class as opposed to converting data to variant and back to data again would compare.  Thanks for the link.

0 Kudos
Message 3 of 3
(2,393 Views)