What is Nostr?
npub1qvq…6ghq
2024-04-25 23:08:07

npub1qv…y6ghq on Nostr: Thought experiment: A microservice should almost never allocate memory that survives ...

Thought experiment: A microservice should almost never allocate memory that survives longer than the servicing of a single request. But almost all modern languages ignore this, instead spamming stuff on heaps and then GC’ing them.

Languages have internal bump allocators (“nurseries”) and then do minor GCs when these are full. Wouldn’t it make *much* more sense to size the nurseries to be big enough to serve 99.999th percentile of requests, and just zap the nursery at the end of each request?
Author Public Key
npub1qvqf0nmv2fr28vgm6tyj0fcmx3nn0c2hpwmk4fgymncfjdrdcuascy6ghq