Re: The inaugural VB6 vs dot net test

Tech-Archive recommends: Fix windows errors by optimizing your registry



"Ulrich Korndoerfer" <ulrich_wants_nospam@xxxxxxxxxxxx> wrote in message news:utiiRAmNIHA.2000@xxxxxxxxxxxxxxxxxxxxxxx

This design has a severe flaw, because the array is predeclared
outside the two methods which do the test and both methods
use the same array. If you do Command1 first, a following
Command2 operates on an array that already has been
accessed . . .

It's not a design! It's just some quickly knocked up test code for you to try. Feel free to write your own code if you don't like it.

My points were: - Speed of counting down or up depends
on how the compiler implements it.

Of course it is. Nobody has said otherwise. And your point is . . . ?

counting down loops (counting down to zero!) in a faster
way than counting up loops. I took this from my observation
(by looking at the assembler code generated for counting up
loops), that the counting up implementation loads on each
iteration the final value for comparison.

That's exactly what I said when I mentioned the BPL stuff! So I don't see what new point you are making? Not that the presence (or absence) of a single instruction in the loop makes much of a difference overall of course when you consider what else is in the loop.

- Secondly of course the speed depends on miscellaneous
processor interna (like branch prediction etc.). So counting
up and down may vary in speed due to such issues too. I
assumed that this is obvious to a programmer who claimed
to have done assembly programmings

Im afraid that they didn't have branch prediction on the 6502 and similar processors I used twenty years ago! But of course all sorts of things need to be taken into consideration. Feel free to perform whatever tests you wish.

But again you just barked . . .

What's all this "barking" you keep going on about. I am not a dog.

Mike


.



Relevant Pages

  • Re: Global array operations: a performance hit?
    ... as if many DO loops were executed instead than just one. ... global array operations then? ... Note that the usual terminology is something more like "whole array ... once in a while they might also get you faster execution, ...
    (comp.lang.fortran)
  • Re: Puppy Mastiff wants to Nip at Faces
    ... first couple of weeks of an introductory data structures ... it seems to me by my recollection that loops were... ... in my first college textbook on structured programming. ... they did was loop through an array to show how you could easily access ...
    (rec.pets.dogs.behavior)
  • Re: Inefficient code?
    ... line is written to the output file. ... or read it into an array. ... # Backup File Field Positions ... Define 'my %found;' above the loops. ...
    (perl.beginners)
  • Re: Global array operations: a performance hit?
    ... when using array operations you have additional information ... which is not always the case in DO loops. ... optimizing array expressions. ... The compiler has to ...
    (comp.lang.fortran)
  • Re: Problem with reading data from files?
    ... Blocked reallocations? ... Not using an array at all is another. ... which is the use of infinite DO loops. ... All I saw was the "pick a large number" scheme, ...
    (comp.lang.fortran)