Coder Social home page Coder Social logo

Comments (2)

asuper0 avatar asuper0 commented on June 13, 2024 1

benchmark code here shows the improvement.

and the result:

     Running benches\benchmark_lib.rs (target\release\deps\benchmark_lib-36879d0bb7f740c7.exe)
Benchmarking sample-size-example/normal: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 121.1s.
sample-size-example/normal
                        time:   [11.078 s 11.456 s 11.868 s]
                        change: [-81.264% -80.491% -79.680%] (p = 0.00 < 0.05)
                        Performance has improved.

     Running benches\benchmark_optimize_buf.rs (target\release\deps\benchmark_optimize_buf-bfd7c03693bf79e1.exe)
Benchmarking sample-size-example/optimize buf: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 79.7s.
sample-size-example/optimize buf
                        time:   [8.5379 s 8.5776 s 8.6159 s]
                        change: [-80.839% -80.737% -80.642%] (p = 0.00 < 0.05)
                        Performance has improved.

     Running benches\benchmark_optimize_drop.rs (target\release\deps\benchmark_optimize_drop-9e46585be99cc901.exe)
Benchmarking sample-size-example/optimize drop: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 95.0s.
sample-size-example/optimize drop
                        time:   [9.3510 s 9.3941 s 9.4321 s]
                        change: [-82.663% -81.850% -81.082%] (p = 0.00 < 0.05)
                        Performance has improved.

The optimization of drop method reduce the time from 11.456s to 9.3941s, then the one of BytesMut reduce to 8.5776s.

from udp-stream.

SajjadPourali avatar SajjadPourali commented on June 13, 2024

Looks good, thank you very much.

from udp-stream.

Related Issues (4)

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.