haxmap icon indicating copy to clipboard operation
haxmap copied to clipboard

Slow compared to map?

Open kokizzu opened this issue 1 year ago • 1 comments

Hi, i was trying to benchmark haxmap vs map,

https://github.com/kokizzu/kokizzu-benchmark/blob/master/assoc/go-haxmap/haxmap.go vs https://github.com/kokizzu/kokizzu-benchmark/blob/master/assoc/map.go the diff https://pastebin.com/diff/V3Y04Uha

but haxmap took like 51s vs 14s using map

time go run go-haxmap/haxmap.go                                                                                                                    
6009354 6009348 611297
36186112 159701682 23370001

CPU: 51.86s     Real: 26.87s    RAM: 2 386 608KB

time go run map.go 
6009354 6009348 611297
36186112 159701682 23370001

CPU: 14.29s     Real: 12.43s    RAM: 2 271 672KB

kokizzu avatar Mar 31 '23 07:03 kokizzu