Baunsgaard commented on PR #2399:
URL: https://github.com/apache/systemds/pull/2399#issuecomment-4508662073

   Just to pitch in, the implementations are indeed not thread safe for some 
specific variations of calling. However, if the caller does not have 
overlapping ranges that it sets, it is perfectly safe for OptionalArrays. 
   
   The BitSetArray was intentionally fixed by introducing the lock (as the 
@yj-40-56  is pointing out), however ideally we should (for good performance) 
avoid using the lock by aligning updates to the nearest 64 values, to allow 
full parallelism.
   
   The RaggedArray and the DDCArray/ACompressedArray are both not designed to 
be frequently updated, so should not be considered a valid copy target.
   
   A better design than the proposed would be to specialize each of the 
fundamental arrays to take from the Source arrays. We have primitives like:
   
   ```
        public abstract void setFromOtherType(int rl, int ru, Array<?> value);
   ```
   
   That allows very efficient cloning from another array into the current one. 
This should just be called in parallel across different input columns.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to