#Performance of big inmutable values

1 messages · Page 1 of 1 (latest)

silver tusk
#

I'm currently implementing the Redis Protocol with Gleam. I've wondered about the performance of big dictionaries being copied all around and I worry about perfomance. Should I search a library that handles mutable dictionaries or does gleam handle this matter gracely?

spring valley
#

What kind of operations are you doing on those dicts?

silver tusk
#

For now, setting and getting values, nothing special

spring valley
#

Because updates, insertions etc are implemented efficiently and do not require copying the whole data structure each time

silver tusk
#

Okay thank you!

#

Talking about performance, I wonder if there are any profiling libraries that I could use. Searching through packages.gleam.run I found nothing 🤔

lilac harness
#

It uses structural sharing to avoid copying

#

This is often faster than mutable data structures in practice

gaunt marten
#

I'm manipulating dict a lot with my CSS things, and it's so fast

vapid marsh
#

For profiling, would you normally profile the generated Erlang or JavaScript code with the profilers from those languages ?