Comments (5)
I have made some good progress on this one.
It doesn't eliminate boxing yet, but at least all the code is generated in a single chunk instead of having layers upon layers of delegates.
This had some dramatic effect on the performance. its now about 20% faster.
from wire.
Closing this, we have #56 which is in progress already
from wire.
I'm not sure I follow, we already do code generation using linq.Expressions CompileToDelegate.
Which is doing il emit behind for you.
from wire.
I'm sorry. I should have been more specific. What I meant was the protobuf ability to actually inline the serializers as well, as they provide this two specific methods: https://github.com/mgravell/protobuf-net/blob/master/protobuf-net/Serializers/IProtoSerializer.cs#L49-L67 . I can see in the default compiler that the object serializer itself is emitted, but still boxing for its value type properties occur as the WriteObject
method uses a serializer and an object. My question was about going one lvl deeper and emitting away the serializer methods. This would allow us to do not box at all in a protobuf-inspired manner :)
from wire.
Ah yes, I will dig into this and see if there is any fairly easy way to adapt the current coded to do this.
That being said, the getters and setters of values are fairly insignificant compared to touching the input/output stream, and looking up types/object identitiers or translating to and from strings/UTF8.
from wire.
Related Issues (20)
- NVM
- Serialization of F# Map HOT 4
- No support for struct with a non-default constructor? HOT 8
- Is Serializer thread safe? HOT 2
- AmbiguousMatchException when serializing a type with multiple AddRange methods HOT 1
- Invalid code generation on fields of interface type HOT 5
- Wire performance improvements HOT 3
- CollectionTests.CanSerializeDictionaryKeysAndValuesByteChar is failing HOT 1
- Wire 0.8.2 is not compatible with 0.8.1 HOT 6
- Stack overflow when serializing/deserializing LinkedList
- OSS license for Wire HOT 2
- Support for IDictionary HOT 3
- Serialize - DeSerialize between similar types. HOT 4
- Speedup dials to compare performance with bond simple binary protocol.
- .NET Core serialization issues
- Signed Wire NuGet package
- support DataContract/DataMember/IgnoreDataMember
- Does wire do zig-zag / 7bit encoding?
- Wire.Extensions.TypeEx CoreAssemblyName ignore mscorelib/System.Private.CoreLib
- .NET Core 3 - Cannot Deserialize
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wire.