Performance optimizations - make series construction faster
Merge changes