Commit a5eabc7
committed
Optimize mapAsync implementation for better performance
- Replaces computation builder approach with direct IAsyncEnumerator implementation
- Achieves 4-8x performance improvement for typical workloads
- Maintains full backward compatibility and passes all tests
- Small memory trade-off (37% increase) for massive speed gains
Performance results:
- 5K elements: 4.1x faster (45ms → 11ms)
- 10K elements: 4.6x faster (88ms → 19ms)
- 20K elements: 7.6x faster (145ms → 19ms)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 9c681e1 commit a5eabc7
1 file changed
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
787 | 806 | | |
788 | 807 | | |
789 | 808 | | |
790 | 809 | | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
795 | 813 | | |
796 | 814 | | |
797 | 815 | | |
| |||
0 commit comments