More performance improvements by using arrays instead of F# lists