langchain-ai
langchain
BlogDocsChangelog

Performance History

Latest Results

perf(core): optimize merge_lists from O(n) to O(n) with index lookup map Previously, merge_lists performed a linear scan through the entire merged list for each element in the 'other' list to find matching indices, resulting in O(n*m) complexity where n is len(merged) and m is len(other). This optimization builds a dict-based index lookup map once per merge operation, reducing index lookups from O(n) to O(1). The map is also updated when new elements are appended. This is a critical hot path during streaming - merge_lists is called on every chunk to merge tool call content, content blocks, and other indexed data structures.
Rudra-Tiwari-codes:perf/merge-lists-index-lookup-optimization
16 hours ago
style(core): add ruff rules TC
cbornet:ruff-core-tc
1 day ago

Active Branches

perf(core): optimize merge_lists from O(n^2) to O(n) with index lookup map
last run
16 hours ago
#34482
CodSpeed Performance Gauge
-1%
#34480
CodSpeed Performance Gauge
+7%
© 2025 CodSpeed Technology
Home Terms Privacy Docs