I'm finding a lack of functions to move raw bytes around in arrays. I can write my own brightscript functions but they are insanely slow compared to if these are implemented in the underlying component architecture.
For example, roByteArray has ifArray.Append which is blazing fast compared to any equivalent I can write in brightscript. That's great, but it has no start_pos and length. So if I want to copy the middle 1000 bytes out of an roByteArray of 8000, without looping in my own brightscript, what can I do?
ifByteArray.AppendFile and ifByteArray.ReadFile have start_pos and length parameters, so these could be used as a hackish work-around, writing to file and reading back to an roByteArray to accomplish this. I had some hope, figuring tmp:/ must just be memory anyway, but I'm profiling ifArray.Append and ifByteArray.AppendFile (with no start_pos and length params) and finding it's 10 times slower to use the file.
Am I missing some basic array copy methods?
As a quick fix, having ifArray.Append with start_pos and length parameters would help tremendously.
rokenbuzz