Skip to content

Releases: alphadose/haxmap

141

27 Oct 06:58
fae115c
Compare
Choose a tag to compare

add go 1.23 iterator support #52 @semihbkgr

140

06 May 01:19
0534913
Compare
Choose a tag to compare
140

add Clear() function to haxmap #47 @semihbkgr

131

19 Dec 04:15
9300b14
Compare
Choose a tag to compare
131

handle edge case to prevent panic during map initialization #44 @semihbkgr

130

22 Aug 18:52
d41ce81
Compare
Choose a tag to compare
130

This release is all thanks to @semihbkgr 🙏

  • Added GetAndDel function similar to golang concurrent map's LoadAndDelete #31
  • JSON encoding support #29
  • Critical bug fixed with Set operation after Delete #34
  • No more unnecessary resizing #36
  • Fix logic of fillrate computation #38

120

14 Nov 13:15
Compare
Choose a tag to compare
120
  • Add atomic CompareAndSwap and Swap APIs #18
  • Improve deletion performance via lazily deleting nodes #17
  • Add GetOrCompute API which works similar to GetOrSet but the value is computed from a constructor which is called only once #16

110

21 Oct 12:00
Compare
Choose a tag to compare
110

Add GetOrSet() API same as golang's sync.Map.LoadOrStore #15

102

03 Oct 01:02
Compare
Choose a tag to compare
102

Fix deadlock when multiple goroutines are trying to delete the same linked-list node f4885e7

101

03 Oct 00:34
Compare
Choose a tag to compare
101
  • Support go 1.18 and above @StandoffVenus #13
  • Fix concurrent deletion issue #14
  • Add bulk deletion feature map.Del(keyA, keyB, keyC...)

Stable

21 Sep 15:01
Compare
Choose a tag to compare
  • Fix bug in delete operation #11
  • Fix deadlock bug during Set() #7 #8
  • Update ForEach() API to match golang's sync.Map.Range() #10

Performance improvement

31 Aug 21:48
Compare
Choose a tag to compare

Notes

  • Improve hashing performance by switching to pure arithmetic and bitmasking for known key sizes

Benchmarks

Benchmarks were performed against golang sync.Map and the latest cornelk-hashmap

All results were computed from benchstat of 20 runs

  1. Concurrent Reads Only
name                         time/op
HaxMapReadsOnly-8            7.13µs ± 5%
GoSyncMapReadsOnly-8         22.4µs ± 2%
CornelkMapReadsOnly-8        8.28µs ± 1%
  1. Concurrent Reads with Writes
name                         time/op
HaxMapReadsWithWrites-8      8.44µs ± 5%
GoSyncMapReadsWithWrites-8   26.1µs ± 2%
CornelkMapReadsWithWrites-8  9.55µs ± 2%

name                         alloc/op
HaxMapReadsWithWrites-8      1.22kB ± 6%
GoSyncMapReadsWithWrites-8   6.06kB ± 6%
CornelkMapReadsWithWrites-8  1.56kB ± 5%

name                         allocs/op
HaxMapReadsWithWrites-8         152 ± 6%
GoSyncMapReadsWithWrites-8      562 ± 6%
CornelkMapReadsWithWrites-8     195 ± 5%