Huge array on C++ -



Huge array on C++ -

i solve problem using c++. have huge array of double-s. used during process of solution, programme adresses different parts both reading them , changing ones.

what type of container proper situation? must access elemetns quilckly , store info properly.

is thought utilize std::vector<double>?

it depends on , how perform operation on container. like:-

associative container std::set efficient in case implemented in terms of balanced binary tree.

but sorted vector outperforms associative container in situations on basis of locality of reference.

if operation on info construction categorized below sub-operations utilize sorted vector:-

1) there insert/delete set info structure.

2) after info construction setup operations predominant.

note: should initialize vector big plenty avoid re-allocations in between.

c++

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -