Re: forall and do loop




"aeroguy" <sukhbinder.singh@xxxxxxxxx> wrote in message
news:1185515815.529321.10760@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

thanks for the reply. My main concern in this program test is not
about low level compiler but to know which coding practise is
effecient in a general sense. I mean, which code will be better
optimized by the compiler if i choose to use the compiler optimization
option.

thanks for the reply.
The general case is talked about somewhat in MR&C 6.9. The example they
look at is array assignment that doesn't seem markedly different than what
you had in the original post. So at first blush and knowing next to nothing
about compiler optimization, I would say that the formulation with the
forall would lend itself better to optimization on parallel processors.
--
Wade Ward


.



Relevant Pages

  • Re: Variable hoisting
    ... The methods are taught, in formal textbooks, on coding practice. ... the "teaching language" it was often covered in introductory programming ... hope that the compiler would magically save you (as it often as not would not ... Your lack of knowledge of its use outside of compiler optimization ...
    (comp.programming)
  • Re: Are optimizing compilers immpossible?
    ... dissimilar to the proof that the halting problem is unsolvable. ... this is explained in the Wikipedia article on compiler optimization. ... The basic idea is that if your program calls the subroutine foo(), ...
    (comp.theory)
  • Re: Programming Language Productivity: The Stupidity of Programmers
    ... The usual idiom is ... -- but you can't usefully index an array with pointer arithmetic ... > Neither is more amenable to compiler optimization. ...
    (comp.programming)
  • Re: Borland Layoffs?
    ... In borland.public.delphi.non-technical, "Will DeWitt Jr." ... > compiler optimization that's done after the actual algorithms have been ...
    (borland.public.delphi.non-technical)
  • Re: I cannot see the need for auto_ptr?!
    ... >>compiler optimization is a wee bit suspect. ... Supposing the ... > part you either have a compiler that suports NVRO or you don't. ...
    (comp.lang.cpp)