Hacker News new | past | comments | ask | show | jobs | submit login

> They were using a protobuf diffing library that used `reflect` under the hood, which allocates. They generated their own explicit object inspection thingies.

IIRC it is `reflect.Type.FieldXXX` which is the main culprit of allocations. Since the number of types in a typical application are bounded and small, you can get pretty far by just precomputing/caching struct fields.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: