Giter Site home page Giter Site logo

Comments (4)

XAMPPRocky avatar XAMPPRocky commented on July 28, 2024

Thank you for your issue! Yeah performance hasn't been a focus as the focus has been on correctness, I reckon this can be improved significantly by improving how parse_encoded_contents to better reduce work done.

from rasn.

knecht avatar knecht commented on July 28, 2024

It might have to do with parsing empty slices which results in errors. Both gdb and flamegraph show a lot of backtrace gathering related stack frames. Although no backtrace becomes visible, it looks as if they are being produced and discarded unless the occurrence of these frame is simply a result of the debugging procedure.

from rasn.

XAMPPRocky avatar XAMPPRocky commented on July 28, 2024

Yeah, I reckon that's also it, we could probably make it better by making the loop internal to parse_encoded_contents, that way we can skip calling it entirely if there's zero length.

from rasn.

XAMPPRocky avatar XAMPPRocky commented on July 28, 2024

I've fixed this with the above commit, this is the output of the above code post that commit. FYI in the future, it would be great if this was written with criterion or iai because then we can commit it to our benches. Thank you for your issue!

decoding 1x 206 bytes took 0 ms
decoding 100x 206 bytes took 6 ms
now decoding on 4 threads, 100x 206 bytes on each
decoding 100x 206 bytes took 10 ms
decoding 100x 206 bytes took 10 ms
decoding 100x 206 bytes took 10 ms
decoding 100x 206 bytes took 11 ms

from rasn.

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.