I am not sure how much of a speedup to expect in the conversion, but I would highly consider using categorical variables for this. This can actually be done directly in textscan using the %C format identifier. In most cases I think this will solve your problem.
If the purpose of the conversion is to have a variable which is easier to query (i.e. numeric comparisson), the categorical will likely do what you are looking for. Take a look at the doc and the methods for this class:
If you actually need a numeric value then it is worth noting that a categorical is storing the data in a numeric (uint*, where * depends on the number of categories) format behind the scenes, so can easily be converted to numeric using one of the conversion functions (double, single, uint16). With 15,000 unique categories, you could not represent this with a uint8.