Skip to content

Optimize build_player_lookup and _lookup_pid in strategy.py #224

Description

@alhart2015

Optimize build_player_lookup and _lookup_pid in strategy.py -- build_player_lookup uses iterrows() on ~5700 rows (~30-50ms per call, called ~12 times per pick). Replace with to_dict("index"). _lookup_pid does O(n) DataFrame scan per call -- build a name->pid dict once instead. Several strategies already build player_lookup but don't pass it through to _lookup_pid.


Migrated from TODO.md (section: postseason) on 2026-07-09. TODO.md is being retired in favor of GitHub Issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogMigrated from TODO.mdpostseasonPostseason / offseason

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions