Skip to content
0:00 / 0:00

#serialization#dotnet#bebop

The fastest .NET Serializer is NOT what you think

CodeWithStu

2.5K subscribers • 1 video on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Linked in the descriptionIm5tu/SerializationBenchmarks
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

5.1K views4 years ago1 recommendation

Systems programmingProgramming languagesPerformance and optimizationC# and .NET

A benchmark comparison of various JSON and binary serializers in .NET to find the fastest option.

Grab code, projects, and socials: codewithstu.tv Recently, I needed to compare the current performance of .NET serializers for a project. In this video, I compare the current state of the serializers and produce some interesting results. Link to the benchmarks repository: github.com/Im5tu/SerializationBenchmarks Json Serializers _____________________ - Jil: nuget.org/packages/Jil/ - Newtonsoft.Json: nuget.org/packages/Newtonsoft.Json - ServiceStack.Text: nuget.org/packages/ServiceStack.Text - SpanJson: nuget.org/packages/SpanJson - UTF8Json: nuget.org/packages/Utf8Json Binary Serializers _____________________ - AvroConvert: nuget.org/packages/AvroConvert - Bebop: nuget.org/packages/bebop - BSON: nuget.org/packages/MongoDB.Bson - GroBuf: nuget.org/packages/GroBuf - Hyperion: nuget.org/packages/Hyperion - MessagePack: nuget.org/packages/MessagePack - MsgPack: nuget.org/packages/MsgPack.Cli - protobuf-net: nuget.org/packages/protobuf-net 📖 Chapters 📖 __________________ - Introduction & Rules - Project setup - JSON Results - Binary Results - Payload Sizes #CodeWithStu #DotNet #AspNetCore

Why it's here

1 person recommends this

What people say. Recommended as an independent benchmark comparing the performance of Bebop and other .NET serializers.

u/AndrewMD5in r/programming • Recommends

On “Bebop v3: a fast, modern replacement for Protocol Buffers”

We don’t try and compress data during serialization so the binary representation might be marginally bigger in some cases (for instance if you serialize a struct with two int32 fields, that’s 8 bytes regardless of the values), but it’s mostly extra zeros and you can run the buffer through something like zstd to get rid of those. Someone did an independent benchmark that goes into more detail here