Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace unique_integer with a ref in ets_lru
We don't really need a strictly monotonic integer, just a unique key for each atime and ctime entry. `unique_integer([monotonic])` is also a concurrency bottleneck as indicated the warning in [1]. Even in a sequential context, it's slower: ``` > timer:tc(fun() -> [erlang:unique_integer([monotonic]) || _ <- lists:seq(1,1000000)], ok end). {434637,ok} > timer:tc(fun() -> [make_ref() || _ <- lists:seq(1,1000000)], ok end). {322988,ok} ``` [1] https://www.erlang.org/doc/man/erlang.html#unique_integer-1
- Loading branch information