If you profile a simple example, you'll see that nearly all the computation time of los2 is being spent on the cummax subfunction. There is a built-in cummax.m function, but for some reason (probably legacy), the los2-called function calculateLOS.m has it's own local non-builtin version of cummax that's much, much, much slower than the builtin. I opened the calculateLOS.m file (<matlabroot>/toolbox/map/map/private/calculateLOS.m) and commented out the cummax subfunction at the very end; an los2 call speeds up dramatically after that (I haven't double-checked to make sure the results are the same, so you should definitely do that, though).
The Mapping Toolbox, unfortunately, is full of little inefficiencies like this one, which aren't very noticeable when running toy examples but really add up when trying to apply them to complex datasets.