in java, I have a large array of strings.
I have one thread doing something like this:
for (int i=0;i<10000;i++) array[i] = getSomeValue();
I have another thread doing something like this:
for (int i=10000;i<20000;i++) array[i] = getSomeValue();
and another thread doing:
for (int i=20000;i<30000;i++) array[i] = getSomeValue();
and so on.
do I have to do something special to do this operation ?
will it work ?
I am trying to populate this large array faster by splitting the task into multiple threads but I wonder if this is the correct thing to do.
I am working with a 64 bit machine 16 cpus and all the fancy stuff.