Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
MemoryPack: Zero encoding extreme performance binary serializer for C# (github.com/cysharp)
33 points by breve 1 day ago | hide | past | favorite | 6 comments
 help



Surprised how well the Orleans serializer performs for most uses cases.

It's nice when you're absolutely sure you won't need schema evolution. Then go for it. If you have a tiny bit of doubt, use a binary alternative that supports it, which for me is Protobuf. You'll get gRPC support for free, which you'll most likely need anyway.

XTREEEEM

memcpy() was the best and fastest serializer from the start. It already existed in 1983.

Start with;

    struct Point {
      int32_t x;
      int32_t y;
    }
Now you want to add z. Whoops - plain memcpy results in corruption.

    struct Foo {
      struct Bar * bar;
    }
Whoops, can’t transfer pointers across.

Also horrible security issues constantly since this was the original serialization technique that was tried.

There is a real reason that serialization frameworks exist and pretending like plain memcpy competes in the same space is either willful ignorance or trolling. Not to mention that these serialization frameworks are zero copy and thus end up being a memcpy to transfer, just with better schema evolution semantics and better safety


If we ignore all portability and data stability issues.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: