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



Patricia Shanahan wrote:
> 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).

Does the term O(n) make sense for finite problems? Big O is just about
asymptotic values. And, yes, as I said, in practice the overhead may
indeed count. :-)

Kind regards

robert

.