Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

asyncio gather vs TaskGroup in async_tree benchmarks #287

Copy link
Copy link
Closed
@itamaro

Description

@itamaro
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

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.