GithubHelp home page GithubHelp logo

Comments (5)

rogeralsing avatar rogeralsing commented on June 10, 2024 2

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.

fast

from wire.

rogeralsing avatar rogeralsing commented on June 10, 2024 1

Closing this, we have #56 which is in progress already

from wire.

rogeralsing avatar rogeralsing commented on June 10, 2024

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.

Scooletz avatar Scooletz commented on June 10, 2024

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.

rogeralsing avatar rogeralsing commented on June 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.