Skip to content

add submission#16

Open
swap357 wants to merge 1 commit into
mpage:mainfrom
swap357:submission
Open

add submission#16
swap357 wants to merge 1 commit into
mpage:mainfrom
swap357:submission

Conversation

@swap357

@swap357 swap357 commented May 15, 2026

Copy link
Copy Markdown

Submission Checklist

  • My file is named submissions/swap357.py.
  • My submission runs locally.
  • My output matches the expected output.
  • I did not hardcode the final output.

Approach Description

worker pool over a lock-free ready queue.
spin-poll instead of blocking. Workers retry popleft() on IndexError rather than blocking on a queue.SimpleQueue.
Chain serial fast-path. A one-time Kahn-style pre-pass computes the max layer width.
Tradeoffs-
Dict-keyed bookkeeping: arrivals and dependents are keyed by str name rather than int index.
No explicit locks on results: relies on the deque's internal mutex for happens-before

@swap357 swap357 marked this pull request as ready for review May 16, 2026 00:01
@github-actions

Copy link
Copy Markdown
Contributor

✅ Results

Metric Value
Speedup 5.349509756586221x
Passed true
Graphs 5

Per-graph results

Graph Speedup Status
chain.json 0.9924524151872066x
diamond.json 4.9403629425353985x
realistic.json 23.800626992644535x
tree.json 20.97577129401014x
wide.json 21.718648386148402x

View the leaderboard

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant