maytasm opened a new issue, #735:
URL: https://github.com/apache/datasketches-java/issues/735

   There is no efficient way to merge two HLL Unions together. 
   HLL Union has the method update but that only takes `HllSketch`
   To get a `HllSketch` from a HLL Union, we need to call HLL Union `getResult` 
which then calls `gadget.copyAs(tgtHllType);`
   However, this does a deep copy, slowing down the merge.
   
   Basically,
   when this and other are both HLL Union:
         → other.union.getResult()       // line 85: triggers gadget.copyAs() — 
FULL COPY of 65K registers
         → union.update(copiedSketch)    // line 111: iterates 65K registers 
again to merge
   
   Two passes over 65K registers + one allocation, when only one pass is needed.
   Am I missing something? Thanks!


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to