wangyum commented on PR #48128:
URL: https://github.com/apache/spark/pull/48128#issuecomment-2354430832
+1. `HashMap` is much faster than `AnyRefMap` since Scala 2.13.0
scala 2.13.8:
```
OpenJDK 64-Bit Server VM 1.8.0_382-b05 on Mac OS X 14.5
Apple M2 Max
Benchmark Map: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
------------------------------------------------------------------------------------------------------------------------
HashMap 1121 1126
3 0.0 280264.2 1.0X
AnyRefMap 1590 1609
29 0.0 397386.4 0.7X
```
scala 2.12.18:
```
OpenJDK 64-Bit Server VM 1.8.0_382-b05 on Mac OS X 14.5
Apple M2 Max
Benchmark Map: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
------------------------------------------------------------------------------------------------------------------------
HashMap 1679 1689
11 0.0 419759.2 1.0X
AnyRefMap 1585 1592
8 0.0 396357.1 1.1X
```
--
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]