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 — asyncio gather vs TaskGroup in async_tree benchmarks · Issue #287 · python/pyperformance

asyncio gather vs TaskGroup in async_tree benchmarks #287

New issue
Copy link
New issue
Copy link
Closed
#293
Closed
asyncio gather vs TaskGroup in async_tree benchmarks#287
#293
Copy link

Description

@itamaro
itamaro
opened on May 7, 2023
Issue body actions

currently, the async_tree set of benchmarks uses asyncio.gather, but asyncio.TaskGroup is the newer cooler thing.

recently I worked on a few asyncio optimizations, and had to patch pyperformance (itamaro@fe365c8) to measure the impact on TaskGroup (in addition to the proposed patch in gh-279 to cover eager task execution).

as an aside, I was also able to compare gather vs TaskGroup (by comparing the results with and without that patch), and found that TaskGroup is faster than gather across the board!

I was wondering what would be the best way to address this in the benchmarks suite.

  1. add yet another set of async_tree flavors that use TaskGroup (in addition to the ones using gather)? (considering the proposed Extend async tree benchmarks to cover eager task execution #279, it's growing the matrix quite a bit)
  2. change the existing set to use TaskGroup instead of gather? (which would make it 3.11+ only, and make it less useful when comparing to older runs that used gather)
  3. keep the existing set as is, but use TaskGroup if it's available, falling back to gather otherwise?
  4. don't bother - leave it with gather

Activity

  1. itamaro commented on May 7, 2023

    @itamaro
    itamaro
    on May 7, 2023
    ContributorAuthor
    More actions

    @willingc @gvanrossum what do you think?

  2. gvanrossum commented on May 7, 2023

    @gvanrossum
    gvanrossum
    on May 7, 2023
    Member
    More actions

    I think it's up to @mdboom. In general fixing benchmarks that already exist is painful enough that we don't do it unless there's no other way (e.g. a feature or dependency becomes obsolete). I am fine with adding another benchmark in the asyncio tree family. Maybe @kumaraditya303 has an opinion too?

  3. kumaraditya303 commented on May 7, 2023

    @kumaraditya303
    kumaraditya303
    on May 7, 2023
    Contributor
    More actions

    I vote for 1, we need benchmarks to cover both gather and taskgroups. Keep me in the loop for any PRs for this.

    Reacted by Itamar Oren
  4. kumaraditya303
    closed this as completedin #293on Jun 13, 2023
  5. kumaraditya303
    added a commit that references this issue on Jun 13, 2023

    gh-287: Add TaskGroups variants to async_tree benchmarks (#293)

    c2e1adb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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.