Click here to Skip to main content
15,888,610 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: State machine performance woes in .NET Pin
BillWoodruff2-Jun-20 5:29
professionalBillWoodruff2-Jun-20 5:29 
GeneralRe: State machine performance woes in .NET Pin
honey the codewitch2-Jun-20 6:38
mvahoney the codewitch2-Jun-20 6:38 
GeneralRe: State machine performance woes in .NET Pin
BillWoodruff2-Jun-20 8:06
professionalBillWoodruff2-Jun-20 8:06 
GeneralRe: State machine performance woes in .NET Pin
honey the codewitch2-Jun-20 9:39
mvahoney the codewitch2-Jun-20 9:39 
GeneralRe: State machine performance woes in .NET Pin
Super Lloyd2-Jun-20 2:24
Super Lloyd2-Jun-20 2:24 
GeneralRe: State machine performance woes in .NET Pin
obermd2-Jun-20 3:34
obermd2-Jun-20 3:34 
GeneralRe: State machine performance woes in .NET Pin
User 110609792-Jun-20 6:27
User 110609792-Jun-20 6:27 
GeneralRe: State machine performance woes in .NET Pin
honey the codewitch2-Jun-20 6:33
mvahoney the codewitch2-Jun-20 6:33 
In C# I typically use a class to represent a state in a state machine. However, when the code gets generated it either resolves to an array instantiation with the appropriate state machine information (fastest option under .NET) or it can resolve to series of gotos (can't really switch case here unless you were to have goto case all over the place in which case you may as well just use goto). The latter option doesn't perform as well as the array/table driven approach. In C++ however, the latter would be faster - and I'd be using a switch to make sure the compiler was generating jmp tables.
Real programmers use butterflies

GeneralRe: State machine performance woes in .NET Pin
kalberts2-Jun-20 8:40
kalberts2-Jun-20 8:40 
GeneralRe: State machine performance woes in .NET Pin
honey the codewitch2-Jun-20 9:37
mvahoney the codewitch2-Jun-20 9:37 
GeneralRe: State machine performance woes in .NET Pin
kalberts2-Jun-20 9:57
kalberts2-Jun-20 9:57 
GeneralRe: State machine performance woes in .NET Pin
honey the codewitch2-Jun-20 10:12
mvahoney the codewitch2-Jun-20 10:12 
GeneralI have such mixed feelings about python Pin
honey the codewitch2-Jun-20 0:51
mvahoney the codewitch2-Jun-20 0:51 
GeneralRe: I have such mixed feelings about python Pin
OriginalGriff2-Jun-20 0:55
mveOriginalGriff2-Jun-20 0:55 
GeneralRe: I have such mixed feelings about python Pin
kalberts2-Jun-20 1:10
kalberts2-Jun-20 1:10 
GeneralRe: I have such mixed feelings about python Pin
honey the codewitch2-Jun-20 1:26
mvahoney the codewitch2-Jun-20 1:26 
JokeRe: I have such mixed feelings about python Pin
Rage2-Jun-20 1:04
professionalRage2-Jun-20 1:04 
GeneralRe: I have such mixed feelings about python Pin
honey the codewitch2-Jun-20 1:13
mvahoney the codewitch2-Jun-20 1:13 
GeneralRe: I have such mixed feelings about python Pin
Rage2-Jun-20 1:19
professionalRage2-Jun-20 1:19 
GeneralRe: I have such mixed feelings about python Pin
ZurdoDev2-Jun-20 1:13
professionalZurdoDev2-Jun-20 1:13 
GeneralRe: I have such mixed feelings about python Pin
honey the codewitch2-Jun-20 1:23
mvahoney the codewitch2-Jun-20 1:23 
GeneralRe: I have such mixed feelings about python Pin
theoldfool2-Jun-20 2:16
professionaltheoldfool2-Jun-20 2:16 
GeneralRe: I have such mixed feelings about python Pin
Sander Rossel2-Jun-20 1:23
professionalSander Rossel2-Jun-20 1:23 
GeneralRe: I have such mixed feelings about python Pin
honey the codewitch2-Jun-20 1:27
mvahoney the codewitch2-Jun-20 1:27 
GeneralRe: I have such mixed feelings about python Pin
John R. Shaw2-Jun-20 1:38
John R. Shaw2-Jun-20 1:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.