Click here to Skip to main content
15,887,214 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: how hard to rewrite a legacy software from C++ to C# in WinForm? Pin
Thornik8-Jan-24 6:13
Thornik8-Jan-24 6:13 
GeneralRe: how hard to rewrite a legacy software from C++ to C# in WinForm? Pin
jochance8-Jan-24 8:14
jochance8-Jan-24 8:14 
GeneralI did a thing. It's neat. Pin
honey the codewitch6-Jan-24 2:11
mvahoney the codewitch6-Jan-24 2:11 
GeneralRe: I did a thing. It's neat. Pin
Gary Stachelski 20216-Jan-24 4:32
Gary Stachelski 20216-Jan-24 4:32 
GeneralRe: I did a thing. It's neat. Pin
PIEBALDconsult6-Jan-24 5:41
mvePIEBALDconsult6-Jan-24 5:41 
GeneralRe: I did a thing. It's neat. Pin
honey the codewitch6-Jan-24 5:44
mvahoney the codewitch6-Jan-24 5:44 
GeneralRe: I did a thing. It's neat. Pin
PIEBALDconsult6-Jan-24 6:23
mvePIEBALDconsult6-Jan-24 6:23 
GeneralRe: I did a thing. It's neat. Pin
honey the codewitch6-Jan-24 6:32
mvahoney the codewitch6-Jan-24 6:32 
PIEBALDconsult wrote:
I also found that (apparently) the RegEx class caches the expressions and I suspect that it must "compile" them as well, otherwise why bother?


I haven't read anything about the caching, but what I can tell you is that algorithmically it is very little work to convert a regular expression into an NFA state machine. It's hardly worth caching, unless they actually mean caching the state machine, but I think that's already done when you call Parse() and get an instance back. It doesn't actually reconstitute it from the string each time.

Converting to a DFA *does* take time, but Microsoft's engine doesn't use DFA.

DFA is much faster in the general case than NFA, but doesn't backtrack. Therefore my library beats out Microsoft's particularly when the input is shorter than say, several pages of text by about 3x under ideal cases - MS's has things like Boyer-Moore optimization which can scan long strings faster.

If you really want the fastest possible performance and you know what the expressions are ahead of time - like they are relatively static/don't change that often, then make them compiled. Otherwise, leave them uncompiled.

If you'd like something really fast (and you know the expressions ahead of time) I can hook you up with my little engine. It's pretty small. It doesn't support anchors or backtracking, but does full UTF-32 Unicode. (You'll need to use the ToUtf32 function to convert UTF-16 to UTF-32.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix

GeneralRe: I did a thing. It's neat. Pin
jschell8-Jan-24 6:47
jschell8-Jan-24 6:47 
GeneralRe: I did a thing. It's neat. Pin
honey the codewitch8-Jan-24 7:04
mvahoney the codewitch8-Jan-24 7:04 
GeneralRe: I did a thing. It's neat. Pin
honey the codewitch6-Jan-24 12:52
mvahoney the codewitch6-Jan-24 12:52 
GeneralRe: I did a thing. It's neat. Pin
PIEBALDconsult6-Jan-24 16:57
mvePIEBALDconsult6-Jan-24 16:57 
GeneralRe: I did a thing. It's neat. Pin
jochance8-Jan-24 8:18
jochance8-Jan-24 8:18 
GeneralRe: I did a thing. It's neat. Pin
PIEBALDconsult8-Jan-24 8:53
mvePIEBALDconsult8-Jan-24 8:53 
GeneralRe: I did a thing. It's neat. Pin
Southmountain6-Jan-24 6:06
Southmountain6-Jan-24 6:06 
GeneralRe: I did a thing. It's neat. Pin
Kenneth Haugland6-Jan-24 6:40
mvaKenneth Haugland6-Jan-24 6:40 
GeneralRe: I did a thing. It's neat. Pin
honey the codewitch6-Jan-24 6:41
mvahoney the codewitch6-Jan-24 6:41 
GeneralFree game Pin
Nelek6-Jan-24 1:58
protectorNelek6-Jan-24 1:58 
GeneralRe: Free game Pin
RickZeeland6-Jan-24 4:18
mveRickZeeland6-Jan-24 4:18 
GeneralRe: Free game Pin
Kenneth Haugland6-Jan-24 15:26
mvaKenneth Haugland6-Jan-24 15:26 
GeneralRe: Free game Pin
Nelek6-Jan-24 23:48
protectorNelek6-Jan-24 23:48 
GeneralFer fawks sake! How to drive one mad... Pin
OriginalGriff6-Jan-24 0:56
mveOriginalGriff6-Jan-24 0:56 
GeneralRe: Fer fawks sake! How to drive one mad... Pin
Nelek6-Jan-24 1:23
protectorNelek6-Jan-24 1:23 
GeneralRe: Fer fawks sake! How to drive one mad... Pin
RickZeeland6-Jan-24 1:45
mveRickZeeland6-Jan-24 1:45 
GeneralRe: Fer fawks sake! How to drive one mad... Pin
OriginalGriff6-Jan-24 1:58
mveOriginalGriff6-Jan-24 1:58 

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.