Re: should every thing be zero indexed?




Jim Rogers wrote:
> spinoza1111@xxxxxxxxx wrote in news:1115248398.464044.38450
> @g14g2000cwa.googlegroups.com:
>
> > This for loop would have the structure of a quantification: for all
x,
> > do something. Our "not caring" in what order the xs are done unto
would
> > free us from a Fortran era annoyance, which is the fact that
arrays,
> > which want to be sets, have to follow the rules for, and be
understood
> > as, arrays.
>
> I acknowledge that the concept of arrays was used heavily in Fortran,
> and has been included in many languages developed since the earliest
> versions of Fortran.
>
> I can see how some uses of arrays would be better expressed as sets,
but
> I can also see how some collections require a specific ordering,
which is
> not necessary in a set.
>
> >
> > I am fooling around with an abstract VB .Net or C# iterator which
would
> > by default schedule each cycle through a for loop as a new thread
to
> > see if the concept flies.
>
> I suspect you can make the concept fly, or at least work acceptably.
> I also suspect that you will find the creation of such a cloud of
> threads to actually be slower than serial iteration, since the number
> of threads will probably greatly exceed the number of processors on
> your system. If the for loop does something mundane such as totalling
> a set of values the cloud of threads approach will quickly degenerate
> into a set of serial operations.
>
> True asynchronous behavior will only be possible when the number of
> threads is no greater than the number of processors or processor
cores,

This doesn't seem 100% right. If only one processor is involved, and
gets stuck in a thread while doing I/O, the thread can be suspended and
another thread can be activated.

My understanding is that "I/O" can involve paging I/O.
> and each thread operates on completely independent data addresses,
with
> no need for coordination beyond that needed to determine when the
> algorithm is complete.
>
> Jim Rogers

.



Relevant Pages

  • Re: should every thing be zero indexed?
    ... > This for loop would have the structure of a quantification: ... > free us from a Fortran era annoyance, which is the fact that arrays, ... I acknowledge that the concept of arrays was used heavily in Fortran, ... threads to actually be slower than serial iteration, ...
    (comp.programming)
  • Re: which language?
    ... > Many engineering and physics calculations use arrays as their ... Fortran compilers have implemented ... Ada provides very efficient arrays. ... > loop index to be changed in the body of the loop. ...
    (comp.programming)
  • Re: [Fortran 77] swaping two arrays (newbie)
    ... > I would like to have my two arrays p and q being swapped in ... > a loop; of course I can do it by myself, ... but there is in Fortran 95. ... Prev by Date: ...
    (comp.lang.fortran)
  • Re: How does this sintax means?
    ... For C programmers it is best to remind them early about the way arrays ... If one wants to call between Fortran and C, then it makes some sense to ... one should be sure that the var_y loop is the inner loop, ...
    (comp.lang.fortran)
  • Re: Whats the best language to learn...
    ... over the arrays of vertices, ... loop over the selected models; ... recently my edge construction and shadow-volume rendering code ... but enums just make it easier and quicker to make ...
    (comp.programming)

Loading