Here are some limitations for the data structure that I need. It seems that none of the common data structures (I mentioned those that I thought below) are consistent with these. Can someone suggest one that I might not have thought of?
N , + . , N .
O (N), , k * N . O (1) K. , O (N) N < K/k. K , N. , Big O N s, , .
k * N
K
N < K/k
N
void *lookup(int key_to_lookup) { int n = 0; while (table_key[n] != key_to_lookup) n++; return table_data[n]; }
.
-, / , N . , .
: . , , .
cpus :
, .
O (N), , . (, 16 , , 8 ), . , , .
, O (N), -, , , 16 - , .
, , , . , "" , , , ., . , . , , .
, , , O (log (N)), . , , N, , , , O (N).
:
->
kmkaplan. , . ...
- , :
, , ( - , - , O (N)), .
, ( -), .
-, -, k * c_1% c_2, / - , , ( cpus capabilites ) .
: , , , , . , -.
, , , - . :
1) - . - .
2) , , :
-, :
5 ( 32- . 64-, .) - , , - (discard ) , , .
, - 64 . , 16, . 64- , , 4 .
Judy Arrays:
- C, , . Judy null . Judy , , , ... Judy , , , -, B-, , , , , .
-, - . O (1) O (logN). , , , .
, N . , , 32 , N, . , .
, , - . , , , - -, , , (, (N-1), N 2 ^ ), , 0. dcache, , , , , , . N = 1?
, : , . , 16 / , .
-. , .
, , , -
, -, , , , .
, , O (n ^ 2), , , , , , , .
. java.util.concurrent , .