You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/07/15 16:39:30 UTC

[GitHub] [calcite] hsyuan commented on pull request #2053: [CALCITE-4102] Some improvements to aggregate related operations

hsyuan commented on pull request #2053:
URL: https://github.com/apache/calcite/pull/2053#issuecomment-658871226


   > > FWIW, I intentionally used `HashMap` rather than `HashSet`. `HashSet` uses a `HashMap` under the covers. I figured I'd save an object allocation. Yours is a bit clearer, a bit less efficient.
   
   > Thanks a lot for your feedback. It is clever to `HashMap` to avoid object allocation.
   Fortunately, the value object for `HashSet` is declared static, so it is allocated once, and shared by all `HashSet` objects. 
   
   I think what @julianhyde means is that the HashSet holds a pointer to HashMap, with HashSet object header, it will use 16 bytes more than bare HashMap. 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org