Mainly caching else after return, not using empty() instead of size() == 0, missing const references to avoid copies and removing redundant initializations