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



Casey Hawthorne wrote:
To increase speed on manipulating big arrays in Java with minimal
bounds checking, would it be possible to have some operators that only
do bounds checking at the boundaries of the array?

A good runtime will pull bounds checking out of inner loops.

This sort of low level optimisation is not something to be concerned about.

Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
.



Relevant Pages

  • Re: traumatized by pointer casting
    ... The array might not be word-aligned. ... It might have an odd address. ... Instead it will generate a hardware trap. ... The implementation determines the boundaries. ...
    (comp.lang.c)
  • Re: Java vs C++ ?
    ... It looks like that your have an array on which cells are marked ... as "boundaries" or not. ... public static float iteration() { ...
    (sci.math.num-analysis)
  • Re: using arrays with loop statements
    ... dimensions but with either 1 or 2 dimensions and depending on how/where I ... 'Set the commencing index of an Array at 1 rather than the default of Zero ... Dim Ll As Long ' lower boundary ... Both boundaries are part of the range. ...
    (microsoft.public.access.formscoding)
  • Re: Spot the bug [OT] lock-free buffer...
    ... I'd dispense with indices into the circular array ... and work on the empty/full and full/empty boundaries directly. ... you want to change, membar, reload the empty boundary element and recheck ...
    (comp.programming.threads)
  • Re: using arrays with loop statements
    ... because both boundaries are a solution to your problem. ... Dim Ll As Long ' lower boundary ... Dim Sb As Long ' size of elements in array B ... Dim CountB As Long ...
    (microsoft.public.access.formscoding)