cxong / cdogs-sdl

Classic overhead run-and-gun game
https://cxong.github.io/cdogs-sdl/
GNU General Public License v2.0
868 stars 115 forks source link

Shift to another hasmap implementation from the deprecated `c_hashmap` #826

Open rootkea opened 8 months ago

rootkea commented 8 months ago

Hello!

Currently, we are using c_hashmap https://github.com/petewarden/c_hashmap which has been deprecated and suggests https://github.com/sheredom/hashmap.h as a replacement.

From https://github.com/petewarden/c_hashmap/blob/master/README: "This version is now deprecated, since it's unmaintained. @sheredom has a newer version at https://github.com/sheredom/hashmap.h"

I researched a bit and these are some of the popular hashmap implementations:

  1. https://github.com/sheredom/hashmap.h (suggested by c_hashmap)
  2. https://github.com/skarupke/flat_hash_map
  3. https://github.com/greg7mdp/parallel-hashmap
  4. https://github.com/khizmax/libcds

IMHO, we should move to any of these or any other active hashmap implementation from the current deprecated c_hashmap.

rootkea commented 8 months ago

I can take this one if https://github.com/sheredom/hashmap.h sounds as an apt alternative.

cxong commented 6 months ago

Sure, happy to review a PR that implements this, but please make sure we regression test all the places that use hashmaps