P-Y on Nostr: I think I'm ok paying that cost because looking up a class by name is rare in the ...
I think I'm ok paying that cost because looking up a class by name is rare in the first place, usually just an entry point.
Most of the time we're traversing a heap graph through references, so everything is optimized for that + low memory footprint.
"Low memory footprint" here means key design choices in critical places:
- Sorted arrays with binary search over hash maps and hash set (load factor=>25% wasted space)
- Byte arrays over objects
Published at
2024-05-30 20:56:48Event JSON
{
"id": "f62484883f0eeb5fe3a1ea15b25a472a3f694c57690e4caf6142c25521c2271d",
"pubkey": "2b9c6c28bce249a1ef28497a2ec6f6c01bc7be0721124b8ce7da3e1592080c57",
"created_at": 1717102608,
"kind": 1,
"tags": [
[
"e",
"45c357aa324f7cf01e55ce09931fdcaafc03bbbc0d3f1dc4c9f7293bbef7b503",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://androiddev.social/users/py/statuses/112532036528828999",
"activitypub"
]
],
"content": "I think I'm ok paying that cost because looking up a class by name is rare in the first place, usually just an entry point.\n\nMost of the time we're traversing a heap graph through references, so everything is optimized for that + low memory footprint.\n\n\"Low memory footprint\" here means key design choices in critical places:\n\n- Sorted arrays with binary search over hash maps and hash set (load factor=\u003e25% wasted space) \n- Byte arrays over objects",
"sig": "1fcf13c4cfbb3bb69fc5b691c0153e51630c9449794d779ca6878a6d27e301b82e24562419dcc961b3de8176d49a2a3a0fc58bef7066c923dd5e5a2ff748cde6"
}