
Are Functions Data? with Yehonathan Sharvit
Software Unscripted
Using a Reduce Hash Map to Detect a Mutation
There are also, it's called volatile. There are volatile closure data structure. One place where we like to use them is when you want to count the number of occurrences of elements in a array. This hash map, you don't really need it to be immutable because once the all internal state that you had are gone, nobody has access to it. Right? So it makes sense to have them mutable, the temporary hash maps. And at the end, you return back immutable data structures. You gain 20% something like that optimization.
00:00
Transcript
Play full episode
Remember Everything You Learn from Podcasts
Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.