Optimize matrix constructor to avoid extra array allocation, and other more trivial quick ones like not compiling regexes repeatedly in loops.
Merge pull request #38 from srowen/MatrixConstructorOptimization

Optimize matrix constructor to avoid extra array allocation