ghhhhhk8899jj·5 ปีที่แล้ว·discussMaking your own custom USB device has quite a large upfront cost since you need to buy a PID/VID.
ghhhhhk8899jj·5 ปีที่แล้ว·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 ปีที่แล้ว·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 ปีที่แล้ว·discussI always find "language X is faster than Y" statements funny when language X's runtime is written in language Y.