I'm trying to write a program that will do simple functions however I'm aware of the fact that calculating a float is slower than an calculating an integer.
What are some techniques for speeding up these functions?
These functions are currently in my void setup() however I'm looking for a way to implement them into the loop by possibly changing the variables using a "for loop". Any advice on how I can create a custom function?
Here is my code:
int potSize = 30; //Size of the pot before the Hero bets.
int bet = 15; //Assume the Villain bets ____ amount
int raiseTo = 90; //Assume the Hero raises, how much is it to call?
first how fast should your code minimal be?
in other words is timing really a problem?
premature optimizations costs a lot of energy and spoil the fun of programming.
I seriously doubt that the time taken to make these calculations is an issue. I'll wager you have the time to carry out this calculation using an abacus, let alone a microcontroller running at 16Mhz.