Re: I need the fastest routine



"Clément Doss" <cdoss@xxxxxxxxxx> wrote
I need the fastest routine.

I doubt it! Usually when programmers are looking for
the fastest execution of a small part of their program,
their are looking in the wrong place to speed up the
overall execution.

If you were to explain about the larger problem, we
would be better able to help you.

I need to find the max and min integer from an array.

(1) How big are the arrays?
(2) How do the arrays get filled?
(3) How often do you need to fetch the extremes?
(4) How often do the arrays get changed?
(5) Why don't you determine the min and max
when the arrays are filled?
(6) Why don't you keep the arrays sorted?
(7) Why don't you link the elements in order?
(8) And a dozen more questions.
But mainly, we could help you better if you
explained more about the larger problem.

Rgds, JohnH
.



Relevant Pages

  • Re: yet another another wish list
    ... C# and Oberon only support zero-based arrays ... By new programmers, I mean programmers whose first introduction to ... of an arbitrary lower bound hardly provides any additional expressive power. ...
    (borland.public.delphi.non-technical)
  • Re: Answer to why low and high are bad !
    ... Skybuck Flying wrote: ... I know us programmers have to get used to that. ... >>And by all means if you want to '0' base your arrays you are free to do ... >>Jim P. ...
    (alt.comp.lang.borland-delphi)
  • Re: What will many cores mean to future Windows releases?
    ... most gpf's occur in end user programs, not in drivers. ... Moreover, you don't even need managed code and VM for that, even in Delphi you can turn on range checking so you won't violate ranges when using arrays. ... I think inexperienced programmers should be kept as far away from C++ as possible. ...
    (borland.public.delphi.non-technical)
  • Re: Fortran bashing in the MATLAB newsgroup
    ... guys there were either no real programmers and just forced by their ... the image of C pointers and did not really understand the Fortran logic ... Python, Matlab, R, and I'm sure many other "scripting" languages let ... one return arrays from a function. ...
    (comp.lang.fortran)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... This is different in Ada, ... A key point is that C arrays are considered 'evil' to C++ programmers. ...
    (comp.lang.ada)