Does Keyboard.begin() and Keyboard.end() make my code slower? I'm making an IR Macro keyboard, and about 10% of the code is dedicated to the Keyboard commands, would having Keyboard.begin() and Keyboard.end() in the method responsible for typing make any difference to the speed or size?
My code:

void decodeCode(){ // send the macros.
  int pos = 0;
  for(int i = 0; i&lt;output.length(); i++){
    if(output.charAt(i) == '$' &amp;&amp; i!=output.length()-1){ //the $ is a symbol for "$pecial" characters
      i++;
      specialDecodeChar(output.charAt(i));
    }
    else if(output.charAt(i) == '%'){
      Keyboard.releaseAll();
    }
    else{
      Keyboard.press(output.charAt(i));
    }
  }
  Keyboard.releaseAll();
}


I currently have Keyboard.begin() in setup().
The Keyboard::begin() and Keyboard::end() functions,  if you actually look at the code are empty functions. They do nothing.

In theory the compiler should just optimise them out.