Post

Also a great example of how writing code thoughtfully in the first place entirely avoids dumb shit like this. Why in the world would you ever implement this with a hastable in the first place?

I see waaaaay too much code reach for a hash map whenever any association is needed. It's often not the right data structure (and on top of that, the standard map, especially in Kotlin the linked hash map, is a bit wasteful in terms of memory and cache access)

0 reposts0 likes

I also immediately wondered "how many of these i->f maps are identical?"... because 24674 of them at 64 bytes a piece is 1.5MB and that's before whatever the heap overhead is for each of those arrays....

I need to write a script to scan that heap dump and see how many identical maps this has... But also strong hunch that none of this code is right anyway. I don't know if I actually want to know more about it though. Veni, vidi, vomit. A little tweak & off I go