#479 Performance: Inefficient last-key access with tuple(dict.keys())[-1]

closed medium Created 2025-12-17 01:42 · Updated 2025-12-17 01:58

Description

Edit
engine/interpreters/inline_executor.py:690,893 Getting last key via tuple conversion is inefficient: ```python last_task_id = tuple(task_graph.keys())[-1] # Creates intermediate tuple ``` FIX: Use next(reversed(dict.keys())) which is O(1) vs O(n) for tuple creation.

Comments

Loading comments...

Context

Loading context...

Audit History

View All
Loading audit history...