I read in other threads that the USB packet size is 64 bytes, and therefore it would be ideal to send at least 64 bytes in one go.
Is this bytecount the payload, or the size of the entire packet, including USB-protocol metadata?
I tried setting reading/writing buffer sizes using SetupComm() under Windows, but that seemed to have no effect. Is that to be expected?
I am aware that the baud rate setting is ignored, but does that apply to all settings of the virtual COM port of the Teensy?
Manually buffering by writing more bytes into an array, and then sending that array at once (as suggested in other threads) had an effect and significantly improved the speed. I find it somewhat confusing though, why increasing the buffer over 64 bytes still had quite noticeable effects. There will still be overhead for each function call, sure, still surprising it's making such a big difference. Maybe entire memory pages get copied (1024/4096 bytes) from user space to the USB driver.
I guess my point is that I'd like to base the design on some rational decisions, on how transfers actually take place. Benchmarks are a good tool, but I may hit technical specialties of special OS versions, that may turn out to be untrue in future.
Is this bytecount the payload, or the size of the entire packet, including USB-protocol metadata?
I tried setting reading/writing buffer sizes using SetupComm() under Windows, but that seemed to have no effect. Is that to be expected?
I am aware that the baud rate setting is ignored, but does that apply to all settings of the virtual COM port of the Teensy?
Manually buffering by writing more bytes into an array, and then sending that array at once (as suggested in other threads) had an effect and significantly improved the speed. I find it somewhat confusing though, why increasing the buffer over 64 bytes still had quite noticeable effects. There will still be overhead for each function call, sure, still surprising it's making such a big difference. Maybe entire memory pages get copied (1024/4096 bytes) from user space to the USB driver.
I guess my point is that I'd like to base the design on some rational decisions, on how transfers actually take place. Benchmarks are a good tool, but I may hit technical specialties of special OS versions, that may turn out to be untrue in future.