Represent weights as arrays instead of arrays
Preliminary tests show a nearly 3-fold increase in speed as a result