Click here to Skip to main content
15,900,110 members
Home / Discussions / C#
   

C#

 
AnswerRe: Performance of Switch case vs dictionary with delegates Pin
jschell29-Apr-24 14:43
jschell29-Apr-24 14:43 
AnswerRe: Performance of Switch case vs dictionary with delegates Pin
Rob Philpott29-Apr-24 22:45
Rob Philpott29-Apr-24 22:45 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Jörgen Andersson29-Apr-24 23:19
professionalJörgen Andersson29-Apr-24 23:19 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Richard Deeming30-Apr-24 0:12
mveRichard Deeming30-Apr-24 0:12 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Rob Philpott30-Apr-24 0:22
Rob Philpott30-Apr-24 0:22 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Jörgen Andersson30-Apr-24 2:15
professionalJörgen Andersson30-Apr-24 2:15 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Rob Philpott30-Apr-24 0:17
Rob Philpott30-Apr-24 0:17 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Jörgen Andersson30-Apr-24 3:14
professionalJörgen Andersson30-Apr-24 3:14 
Rob Philpott wrote:
so is it that you've got these large files to process and you're trying to optimise the switching (state changes) for speed

Indeed.
Rob Philpott wrote:
Which approach are you using at the moment

I've set up the parsing using switches just to make sure it works, but it's painfully slow so I'm looking at refactoring it at the moment.

Rob Philpott wrote:
Does this mean the switch/state change logic is fixed in advance?

This is where it gets funny.
In theory yes. But changes might happen every now and then
These files are supplied by a government entity. And while we're allowed to get the data (which is actually only a subset), we're not allowed to take part of the documentation (no, really).
And they can't be bothered to make separate documentation for our subset (without us paying an extortion fee that is).
So I've added logics that tells me when they've added or removed attributes.
Oddly enough, I'm having fun tinkering with these files, mostly.

Multithreading is the next logical step, but I want to get as far as possible without using brute force before that.
Wrong is evil and must be defeated. - Jeff Ello

GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Jörgen Andersson30-Apr-24 4:22
professionalJörgen Andersson30-Apr-24 4:22 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Rob Philpott30-Apr-24 4:27
Rob Philpott30-Apr-24 4:27 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
jschell30-Apr-24 12:17
jschell30-Apr-24 12:17 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Jörgen Andersson1-May-24 8:21
professionalJörgen Andersson1-May-24 8:21 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Jörgen Andersson1-May-24 8:49
professionalJörgen Andersson1-May-24 8:49 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Richard Deeming1-May-24 21:47
mveRichard Deeming1-May-24 21:47 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
trønderen2-May-24 6:50
trønderen2-May-24 6:50 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Richard Deeming2-May-24 21:39
mveRichard Deeming2-May-24 21:39 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Rob Philpott2-May-24 23:57
Rob Philpott2-May-24 23:57 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
Richard Deeming3-May-24 0:39
mveRichard Deeming3-May-24 0:39 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
trønderen3-May-24 3:36
trønderen3-May-24 3:36 
GeneralRe: Performance of Switch case vs dictionary with delegates Pin
trønderen3-May-24 3:34
trønderen3-May-24 3:34 
Question3D графика Pin
Member 1381389024-Apr-24 19:16
professionalMember 1381389024-Apr-24 19:16 
GeneralRe: 3D графика Pin
Ralf Meier24-Apr-24 20:55
mveRalf Meier24-Apr-24 20:55 
AnswerRe: 3D графика Pin
Pete O'Hanlon24-Apr-24 20:58
mvePete O'Hanlon24-Apr-24 20:58 
GeneralRe: 3D графика Pin
Richard Deeming30-Apr-24 0:01
mveRichard Deeming30-Apr-24 0:01 
AnswerRe: 3D графика Pin
OriginalGriff24-Apr-24 21:47
mveOriginalGriff24-Apr-24 21:47 

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.