Closed MabezDev closed 11 months ago
The addition of the vtable may also affect the cache performance as the vtable might end up being a jump to somewhere far away from the currently executing code.
Note that while this is true in general, in the specific case of esp-flasher-stub this doesn't matter since all the code is in the internal RAM. On existing ESP chips, internal RAM is accessed directly without caching (TCM).
Using
dyn
should be avoided, as it will inflate the binary size due to the addition of the vtable. The addition of the vtable may also affect the cache performance as the vtable might end up being a jump to somewhere far away from the currently executing code. Instead ofdyn
we should use anenum
and implement theInputIO
on that. Depending on the enum variant I.eTransport::Uart
orTransport::Usb
selected, the behaviour will be different at run time.