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



Robert Klemme wrote:
....

Erm, strictly speaking copying becomes relatively cheaper (and thus neglectible) if the op is worse than O(n), doesn't it? Anyway, even if the op is O(n) you could neglect copying - from a theoretical perspective (O(n) = O(2n)). It might be different in practice if arrays are huge (mem allocation overhead) or if they are small and there are many invocations.
....

For any finite problem size, O(n) can be worse than O(n^2).

Patricia
.