GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Move Benchmarks From Tools/ to the pyperformance Repo · Issue #97680 · python/cpython

Move Benchmarks From Tools/ to the pyperformance Repo #97680

New issue
Copy link
New issue
Copy link
Open
Open
Move Benchmarks From Tools/ to the pyperformance Repo#97680
Copy link
Assignees
mdboom
Labels
performancePerformance or resource usagePerformance or resource usagetestsTests in the Lib/test dirTests in the Lib/test dirtriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.

Description

@ericsnowcurrently
ericsnowcurrently
opened on Sep 30, 2022
Issue body actions

(See https://discuss.python.org/t/remove-outdated-tools-scripts-scripts/19571/10.)

The Tools directory currently has some benchmarks in it:

  • ccbench
  • iobench
  • importbench
  • stringbench
  • maybe others?

It would probably make sense to move them to the pyperformance repo.

CC @rhettinger @gvanrossum

Reacted by Donghee Na

Activity

  1. ericsnowcurrently
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Sep 30, 2022
  2. mdboom
    assigned
    mdboom
    and unassigned
    mdboom
    on Oct 3, 2022
  3. iritkatriel
    removed
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Oct 3, 2022
  4. arhadthedev commented on Oct 6, 2022

    @arhadthedev
    arhadthedev
    on Oct 6, 2022
    Member
    More actions

    maybe others?

    Tool/scripts/var_access_benchmark.py

    Reacted by Eric Snow and Donghee Na
    Reacted by Raymond Hettinger
  5. arhadthedev
    added this to Contribution Queueon Oct 6, 2022
  6. arhadthedev
    moved this to Todo in Contribution Queueon Oct 6, 2022
  7. rhettinger commented on Oct 10, 2022

    @rhettinger
    rhettinger
    on Oct 10, 2022
    Contributor
    More actions

    Why put them somewhere else? These are used during CPython development to quickly test the effect of changes. If you put them in another repo, they just get harder to access — I would likely never use them again or would have to keep a local copy.

    IIRC the original purpose of the Tools directly was as a convenient place for us to keep scripts that we use during development.

  8. gvanrossum commented on Oct 10, 2022

    @gvanrossum
    gvanrossum
    on Oct 10, 2022
    Member
    More actions

    I created the “faster Python” project and we definitely don’t use these to assess performance improvements.

  9. ericsnowcurrently commented on Oct 10, 2022

    @ericsnowcurrently
    ericsnowcurrently
    on Oct 10, 2022
    MemberAuthor
    More actions

    Regardless of the value of keeping these in the Tools directory, adding these micro benchmarks to pyperformance is still likely worth doing.

    (FWIW, I have no real interest either way in the ongoing Tools/ cleanup.)

  10. corona10 commented on Oct 11, 2022

    @corona10
    corona10
    on Oct 11, 2022
    Member
    More actions

    @ericsnowcurrently

    I concur with Eric's comment.
    As the #98152 author (even if it was duplicated).
    The Faster CPython team measures performance regression for every iteration so to make their task more effective we should centralize benchmark suites as possible.
    And also nowadays most of performance people are looking pyperformance benchmarks instead of running the manual bench suites under Tools directory.
    If we port them into pyperformance benchmarks we can get the diff result for every iteration from https://github.com/faster-cpython/ideas/tree/main/benchmark-results.

    Yeah, accessibility from some people can be degraded but I think that overall gain will be positive if we move them into pyperformance projects and I believe that we should reduce fragmentation as possible.

  11. gvanrossum commented on Oct 11, 2022

    @gvanrossum
    gvanrossum
    on Oct 11, 2022
    Member
    More actions

    If someone submits a PR to pyperformance can they please link to it here?

  12. vstinner commented on Oct 12, 2022

    @vstinner
    vstinner
    on Oct 12, 2022
    Member
    More actions

    I proposed #98214 to just remove Tools/scripts/startuptime.py: there are other existing tools to measure Python startup time.

  13. vstinner commented on Oct 12, 2022

    @vstinner
    vstinner
    on Oct 12, 2022
    Member
    More actions

    Tool/scripts/var_access_benchmark.py

    That's a micro-benchmark. I don't think that it belongs to pyperformance which tries to be a collection of macro benchmarks. Well, if someone wants to move it there, go ahead.

    In the past, I created https://github.com/vstinner/pymicrobench which is a collection of CPython micro-benchmarks. If someone is interested by microbenchmarks, maybe it should be moved somewhere else. Usually, I only run a micro-benchmark once to prove that a change makes a function faster. But later, I don't use them anymore.

    If possible, I would prefer to move var_access_benchmark.py outside CPython source code, since I'm trying to remove Tools/scripts/: see issue #97669 :-)

  14. vstinner commented on Oct 12, 2022

    @vstinner
    vstinner
    on Oct 12, 2022
    Member
    More actions

    stringbench is also documented as being a microbenchmark:

    Various microbenchmarks comparing unicode and byte string performance

    I'm not sure if pyperformance is a good fit for it.

  15. iritkatriel
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Nov 28, 2023
  16. Sophist-UK commented on Feb 18, 2024

    @Sophist-UK
    Sophist-UK
    on Feb 18, 2024
    More actions

    I would have commented sooner had I known that this was about to happen. It would have been helpful if someone had commented in my PR to ccbench.py that this was being considered so that I would have been notified and might have had a chance to comment before it happened.

    I believe it was clear from the extensive discussion about the shortcomings of the current GIL in faster-cpython that the ccbench script is still useful - because it clearly identifies an ongoing performance issue when multithreading with one or more CPU-heavy threads.

    That said, I do understand that performance scripts do not really have a place in the cpython source code repo, but unfortunately I do not have the time to rework the updated ccbench script for the pyperformance suite, so I guess it is going to just disappear.

    @vstinner Victor : I am sorry to hear that your own micro-benchmarking scripts are also languishing. Despite an overall good focus on cpython performance improvements, unfortunately from the evidence of the above referenced discussion, the lack of response to your appeal for someone to take on your own code and this issue/PR removing performance scripts do suggest that the focus on cpython performance improvements is somewhat narrow and clique-esque. Ah well - we can but try,

  17. hugovk commented on Feb 18, 2024

    @hugovk
    hugovk
    on Feb 18, 2024
    Member
    More actions

    Note: the above is reference to #101853 that I just merged (after being open for a year) which removed Tools/{io,cc,string}bench.


    I would have commented sooner had I known that this was about to happen. It would have been helpful if someone had commented in my PR to ccbench.py that this was being considered so that I would have been notified and might have had a chance to comment before it happened.

    Apologies, I'll ping next time this sort of thing comes up. (btw we wouldn't be allowed to merge your PR because it looks like the CLA isn't signed.)

    That said, I do understand that performance scripts do not really have a place in the cpython source code repo, but unfortunately I do not have the time to rework the updated ccbench script for the pyperformance suite, so I guess it is going to just disappear.

    Yep, in general, benchmarks are much more useful in pyperformance, because they're run often and people pay attention to their results.

    The code hasn't disappeared, it's in the 3.12 and older branches, and in Git history, so can still be referred to when/if adding to pyperformance.

    And of course, if there's consensus we can easily revert/re-add bits of #101853.

  18. StanFromIreland
    added
    triagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
    performancePerformance or resource usagePerformance or resource usage
    on Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @mdboom
    mdboom

Labels

performancePerformance or resource usagePerformance or resource usagetestsTests in the Lib/test dirTests in the Lib/test dirtriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.