ghhhhhk8899jj·5 anni fa·discussMaking your own custom USB device has quite a large upfront cost since you need to buy a PID/VID.
ghhhhhk8899jj·5 anni fa·discussvolatile does not imply compiler fence on gcc, so this code has a race condition when updating read/write_position, you need compiler barriers here>data[write_position] = value;>COMPILER_BARRIER(); // __asm__ volatile("":::"memory");>write_position = (write_position + 1U) % LENGTH;and same in Skip()
ghhhhhk8899jj·5 anni fa·discussFor now... Wait a few months/a year and they will find a reason to "take advantage" of that increase in performance and slow it back down again.
ghhhhhk8899jj·6 anni fa·discussI always find "language X is faster than Y" statements funny when language X's runtime is written in language Y.