inline read_val, 8% speedup