You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to do some I2C bitbanging ( not really for 824 since it has enough ports ), I then need dynamic pins so that I can both read and write to the pins. The problem is that every set_high() & set_low() ends up calling into Register::new() which is a rather expensive function to call as it is 30+ instructions long with many writes to memory, This severely hampers the speed at which I can switch the gpio pins. I am thinking that the Register block will be the same every time it is newed() and can be cached somehow ?
The text was updated successfully, but these errors were encountered:
Are you compiling with --release? I always assumed that the compiler would optimize this out, but looking at the code again, I'm not sure that's right. Maybe adding an #[inline(always)] to Registers::new will help though.
I am trying to do some I2C bitbanging ( not really for 824 since it has enough ports ), I then need dynamic pins so that I can both read and write to the pins. The problem is that every set_high() & set_low() ends up calling into Register::new() which is a rather expensive function to call as it is 30+ instructions long with many writes to memory, This severely hampers the speed at which I can switch the gpio pins. I am thinking that the Register block will be the same every time it is newed() and can be cached somehow ?
The text was updated successfully, but these errors were encountered: