Significant speedups by: (1) removing redundant metadata read, (2) switching from str2num to the sscanf primitive.