Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/21102#discussion_r203319710
--- Diff:
core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala ---
@@ -163,7 +187,7 @@ class OpenHashSet[@specialized(Long, Int) T: ClassTag](
* to a new position (in the new data array).
*/
def rehashIfNeeded(k: T, allocateFunc: (Int) => Unit, moveFunc: (Int,
Int) => Unit) {
- if (_size > _growThreshold) {
+ if (_occupied > _growThreshold) {
--- End diff --
When 'remove' is called, '_size' is decremented. But, an entry is not
released. This is a motivation to introduce 'occupied'.
I will try to use another implementation without 'remove' while it may
introduce some overhead.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]