GFQL perf follow-ups from the #1905 trail-correction work (pandas ~2%, polars q8@20k)

オープン
#1,908 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
静か
技術スタック
pandas, python
領域
data, performance

調査の方向性

Start with plans/gfql-benchmark-numbers/plan.md and review the #1907 performance investigation and its benchmark methodology. The work has three possible directions: investigate the indexed DegreeFact.self_loops shortcut, resolve the polars q8 @20k result with more benchmark slots or drop the claim, and move durable harness code to pyg-bench. Confirm scope and measurement expectations before starting; done means the selected follow-up is validated and its results are recorded.

索引モデルが issue の本文から書いたものです。

説明

Carried forward from the #1907 perf investigation (four passes, three board A/B rounds; full accounting in plans/gfql-benchmark-numbers/plan.md). Neither is release-blocking; both are honest debits.

1. pandas @100k carries ~+2% vs the pre-#1905 floor. Pooled per-iteration p50: floor 89.76 / prev-head 90.99 / current 91.75 on q8. This is the trail correction's absolute cost (~2.2 ms probe, _two_hop_trail_illegal_pairs) landing on a fast cell. Blocking it for pandas was measured and is worse (+1.84 ms, significant — per-block call overhead exceeds the pass saved), and five probe formulations cluster within 0.26 ms, so the pass itself is at its floor. The removable route is a soundness proof rather than a faster scan: consult a degree fact for self_loops == 0 on the matching partition ⇒ zero illegal pairs, skipping the scan entirely. Index-dependent, so it cannot fire on the board's --binding cold arm, but it would help indexed users.

2. polars q8 @20k nominally +6.7% over floor (2.39 vs 2.24 ms), p=0.11 — not resolvable at 18 slots/build. Either confirm with more slots or drop the claim; do not quote a 20k q8 delta in either direction as things stand.

3. Harness placement. The per-query harnesses written for this investigation (in-situ variant swap, lane instrumentation, formulation shoot-outs) live in a session scratchpad. Per the standing convention that benchmark CODE lives in pyg-bench and pygraphistry carries only results, they should move to pyg-bench if these measurements are meant to be durable.

Context for anyone picking this up: the residual cost IS the correctness fix — the count is one bandwidth-bound re-read of both endpoint columns (five formulations within 0.126 ms, ~19.4 MB at ~16 GB/s). The only two ways to skip it are DegreeFact.self_loops (O(1), needs an index) and the bounds-proof by-product now used on the polars dense lane.

主要言語
Python
スター
2.6k
フォーク
229
平均マージ
1日 5時間
マージ済み PR(30日)
100

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

graphistry/pygraphistry のほかの issue

graphistry/pygraphistry の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。