jsm

jsm OP

Yes I know of that, benchmarked it too, but for some reason that performs quite poorly right now in comparison with ModuleStore and :persistent_term, maybe there’s been some regression in combination with OTP/Elixir upgrades somewhere. Also it’s unmaintained and the compiler coughs up warnings about it :see_no_evil:

Anyway, thank you all for all of the feedback. I think I’ll leave the lib out there and people can decide for themselves. If I become aware of practical issues with ModuleStore, I will re-evaluate!

0
Post #11
ltd

ltd

One thing striking in your benchmarks is how poor Application.get_env performs. It’s got me thinking I should could/should put some :persistent_term.put’s in my config files for often accessed config blocks. I don’t think readability suffers.

If anything, I think :persistent_term match module access. I wonder if the variability, is the jit or something.

0
Post #12
benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

While I agree that a lot of the uses of app config do seem like good candidates for persistent term, I do want to note that the benchmark is still showing tens of millions of operations per second. “Poor” isn’t really the way to look at it here.

It is curious to see the module doing about twice as fast though. Absinthe had the opposite experience BUT it had very large values that were very tricky to compile into a module.

1
Post #13
jsm

jsm OP

The benchmark file is included in the source under bench, maybe I mucked it up somehow? I deliberately tried to keep it simple though. 100 pairs for every type of storage, take only the 50th atom key as quickly as you can.

0
Post #14
— All posts loaded —