Minor Fixes

1. Measure the time to create matrix allocations and save as a Long
variable (as the preparation of actually measuring and save it)
2. BUG: OutOfMemoryException happens in G2 when doing 2000*2000
computation: casting the matrix to a long array took twice memory