Coder Social home page Coder Social logo

Comments (5)

nvzqz avatar nvzqz commented on June 19, 2024 1

Your benchmarks are measuring dropping Vec inputs because they use bench_values. Switching to bench_refs fixes the timings by deferring drop until after the loop.

Not sure why sleeping affects timings though.

from divan.

nvzqz avatar nvzqz commented on June 19, 2024 1

I see the issue here. You're setting max_time = 0.1 which also takes into account input generation time.

Internally it's hitting max_time because the benchmark loop needs more iterations but then with_inputs spends more of the time budget. This causes with_sleep to only have enough time to record a single sample of 1, 8, or 64 iterations. To get accurate timings it needs to record multiple samples over more iterations.

Setting DIVAN_SAMPLE_SIZE=100 (instead of dynamic sample size) shows that sleeping in input generation doesn't affect timings.

from divan.

OliverKillane avatar OliverKillane commented on June 19, 2024

D'oh, forgot the drop. That fixes it for me - much appreciated!

Is the with_sleep worth pursuing, or should we close this issue?

from divan.

nvzqz avatar nvzqz commented on June 19, 2024

I think sleeping affecting timing is a legit issue.

from divan.

OliverKillane avatar OliverKillane commented on June 19, 2024

I have fixed the linked example, with a simpler mm_pause for busy sleeping. I need to sleep now.

from divan.

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.