Re: To increase speed on manipulating big arrays in Java with minimal bounds checking, ...



Patricia Shanahan wrote:

> > > This sort of low level optimisation is not something to be concerned
> > > about.
> >
> >
> > Unless, of course, you are manipulating large amounts of data and the
> > application is running too[*] slow.
>
> and you have investigated the slowness and found that it is due to
> bounds checking.

I think you have misunderstood me. I was talking about the circumstances under
which one would get into that kind of investigation in the first place, not the
circumstances under which one would actually attempt to optimise. As you say,
there's no point in optimising something that isn't actually slowing you
down[*].

([*] Although I should add that quite often the simplest way of measuring the
potential gains from an optimisation is just to try it, or a simplified
version of it)

-- chris



.



Relevant Pages

  • Re: Available memory and limit on thread creation
    ... I always wanted some sort of animation tool so you could watch data ... You would watch a typical transaction flowing through the ... making the code hard to read, and programmers terrified to do ANYTHING ... Knuth's admonition that premature optimisation is the root of all ...
    (comp.lang.java.programmer)
  • Re: Dont be overawed by a C compiler.
    ... The practice piece uses an original ... optimisation and the other with all optimisation turned off. ... What is the purpose of introducing the STL template sort and the LIBC ... sort when there is no direct comparison with the exact algorithms? ...
    (comp.lang.asm.x86)
  • Re: Dont be overawed by a C compiler.
    ... The practice piece uses an original ... > optimisation and the other with all optimisation turned off. ... > What is the purpose of introducing the STL template sort and the ... > either the C or assembler source code available for either? ...
    (comp.lang.asm.x86)
  • Re: Dont be overawed by a C compiler.
    ... Algorithm design and code optimisation are different ... A Quick sort on truly random data is still faster than any other design ...
    (comp.lang.asm.x86)
  • Re: which is efficent for loop ??
    ... > which one is the better loop in cosidering on the optimisation level ... Don't choose the second way of looping just becuase it might be faster, ... Life is too short for that sort of thing. ...
    (alt.comp.lang.learn.c-cpp)