LuciferYang commented on PR #48128:
URL: https://github.com/apache/spark/pull/48128#issuecomment-2354770718
@wangyum @George314159
```scala
val benchmark = new Benchmark("Benchmark Map", size, minNumIters = 30)
benchmark.addCase("HashMap") { _ =>
keys.foreach { key => map1.getOrElseUpdate(key, new Object()) }
}
```
Is this benchmark primarily testing the performance of the `get`? After the
first iteration, all key-value pairs are already in the map, so subsequent
iterations should not reach the `OrElseUpdate` branch?
--
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]