clj-commons / potemkin

some ideas which are almost good
577 stars 53 forks source link

Remove dependency on clj-tuple #75

Closed alexander-yakushev closed 11 months ago

alexander-yakushev commented 11 months ago

Currently, clj-tuple is used only by potemkin.utils/fast-memoize. I propose to remove it to slightly optimize the dependency graph of this library's consumers. Reasons:

  1. It is used by a single function that is deprecated.
  2. clj-tuple is an archived abandoned project.
  3. clj-tuple doesn't improve the memory footprint that much over plain vectors (36 bytes per tuple). Here are the average size numbers of clj-tuple vs PersistentVector measured over 1,000,000 elements:
Tuple elements clj-tuple size in bytes PV size in bytes
0 4 4
1 36 68
2 36 68
3 44 76
4 44 76
5 52 84
6 52 84