lib: Performance improvements #1208
Triggered via pull request
December 10, 2024 21:46
Status
Success
Total duration
46m 30s
Artifacts
–
Annotations
1 warning and 2 notices
benchmark
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Benchmark results:
libs/checkpoint/langgraph/checkpoint/memory/__init__.py#L1
.........................................
fanout_to_subgraph_10x: Mean +- std dev: 61.7 ms +- 1.7 ms
.........................................
fanout_to_subgraph_10x_sync: Mean +- std dev: 52.5 ms +- 1.0 ms
.........................................
fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 75.3 ms +- 1.1 ms
.........................................
fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 95.5 ms +- 1.5 ms
.........................................
fanout_to_subgraph_100x: Mean +- std dev: 625 ms +- 28 ms
.........................................
fanout_to_subgraph_100x_sync: Mean +- std dev: 514 ms +- 8 ms
.........................................
fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 780 ms +- 23 ms
.........................................
fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 950 ms +- 18 ms
.........................................
react_agent_10x: Mean +- std dev: 31.0 ms +- 0.6 ms
.........................................
react_agent_10x_sync: Mean +- std dev: 22.8 ms +- 0.2 ms
.........................................
react_agent_10x_checkpoint: Mean +- std dev: 38.2 ms +- 0.7 ms
.........................................
react_agent_10x_checkpoint_sync: Mean +- std dev: 36.9 ms +- 0.4 ms
.........................................
react_agent_100x: Mean +- std dev: 342 ms +- 7 ms
.........................................
react_agent_100x_sync: Mean +- std dev: 275 ms +- 3 ms
.........................................
react_agent_100x_checkpoint: Mean +- std dev: 850 ms +- 9 ms
.........................................
react_agent_100x_checkpoint_sync: Mean +- std dev: 842 ms +- 8 ms
.........................................
wide_state_25x300: Mean +- std dev: 23.2 ms +- 0.5 ms
.........................................
wide_state_25x300_sync: Mean +- std dev: 14.8 ms +- 0.1 ms
.........................................
wide_state_25x300_checkpoint: Mean +- std dev: 285 ms +- 14 ms
.........................................
wide_state_25x300_checkpoint_sync: Mean +- std dev: 274 ms +- 13 ms
.........................................
wide_state_15x600: Mean +- std dev: 27.0 ms +- 0.5 ms
.........................................
wide_state_15x600_sync: Mean +- std dev: 17.3 ms +- 0.3 ms
.........................................
wide_state_15x600_checkpoint: Mean +- std dev: 487 ms +- 14 ms
.........................................
wide_state_15x600_checkpoint_sync: Mean +- std dev: 473 ms +- 14 ms
.........................................
wide_state_9x1200: Mean +- std dev: 26.9 ms +- 0.4 ms
.........................................
wide_state_9x1200_sync: Mean +- std dev: 17.3 ms +- 0.2 ms
.........................................
wide_state_9x1200_checkpoint: Mean +- std dev: 317 ms +- 13 ms
.........................................
wide_state_9x1200_checkpoint_sync: Mean +- std dev: 307 ms +- 14 ms
|
Comparison against main:
libs/checkpoint/langgraph/checkpoint/memory/__init__.py#L1
+-----------------------------------------+---------+-----------------------+
| Benchmark | main | changes |
+=========================================+=========+=======================+
| fanout_to_subgraph_10x_checkpoint | 96.6 ms | 75.3 ms: 1.28x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_checkpoint | 989 ms | 780 ms: 1.27x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_10x_checkpoint | 47.3 ms | 38.2 ms: 1.24x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_100x_checkpoint | 940 ms | 850 ms: 1.11x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_9x1200 | 28.0 ms | 26.9 ms: 1.04x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x | 650 ms | 625 ms: 1.04x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_sync | 534 ms | 514 ms: 1.04x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_15x600 | 28.1 ms | 27.0 ms: 1.04x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x | 64.0 ms | 61.7 ms: 1.04x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_25x300 | 24.0 ms | 23.2 ms: 1.03x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_sync | 54.1 ms | 52.5 ms: 1.03x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_25x300_sync | 15.3 ms | 14.8 ms: 1.03x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_9x1200_sync | 17.7 ms | 17.3 ms: 1.03x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_checkpoint_sync | 972 ms | 950 ms: 1.02x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_15x600_sync | 17.7 ms | 17.3 ms: 1.02x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_100x | 347 ms | 342 ms: 1.02x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_checkpoint_sync | 97.0 ms | 95.5 ms: 1.02x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_9x1200_checkpoint | 322 ms | 317 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_10x_sync | 23.2 ms | 22.8 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_10x | 31.3 ms | 31.0 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_100x_sync | 277 ms | 275 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_10x_checkpoint_sync | 37.1 ms | 36.9 ms: 1.00x faster |
+-----------------------------------------+---------+-----------------------+
| Geometric mean | (ref) | 1.05x faster |
+-----------------------------------------+---------+-----------------------+
Benchmark hidden because not significant (6): wide_state_25x300_checkpoint, wide_state_25x300_checkpoint_sync, wide_state_15x600_checkpoint_sync, react_agent_100x_checkpoint_sync, wide_state_15x600_checkpoint, wide_state_9x1200_checkpoint_sync
|