Re: exhaustive switch bound checking




Artem Alimarine a écrit :

Alexander Grigoriev wrote:
Does it pose a particular problem? Does it create a measured performance
bottleneck?


Yes, this dispatch is done in a loop. This is the most performance
critical part of the application. So, it will slowdown the performance
noticably. I expect it can eat several percents of performance. In my
case performance is very it is important.

You "expect" but you haven't done any measurement, right? "Premature
optimization is the root of all evil". Do not EVER optimize code
without a factual proof that it is worth optimizing....

Just my 2 cents...

Arnaud
MVP - VC

.



Relevant Pages

  • RE: reference counting and PyTuple_SetItem
    ... is truly the bottleneck, then it *may* be good to trade off maintainability ... But what you're doing in the C loop here is almost certainly ... at all -- it's buying you bugs, but I'm not sure it's buying you anything ...
    (comp.lang.python)
  • Re: Multiple Classes per File and use
    ... you used a for loop with the implied use of $_ as the loop variable. ... >> ...make a dispatch table... ... XC> jump table is a jump table, no matter what you call it. ... table and none that support using symrefs there. ...
    (comp.lang.perl.misc)
  • Re: bytes To Hex
    ... if i have a long loop ..i tend to do as little stack pops as i can ... which tends to bottleneck a lot more. ... paragon of readability. ... StringBuilder isn't a cure-all for string performance problems. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: MsgWaitForMultipleObjects and Timer
    ... while(PeekMessage(lpmsg, hwndPrincipale, 0,0,PM_REMOVE)); ... Don't you want to, I don't know, maybe dispatch these messages so they ... rather than quietly dropping them on the floor? ...
    (microsoft.public.vc.language)
  • Are structures really slower than numeric variables?
    ... I have the following "bottleneck" line in a loop, ... U is an Nx1 matrix, ... n.K is an Nx2 matrix, part of a large structure n ...
    (comp.soft-sys.matlab)

Quantcast