optimize ArrayEx: max array length = max long value