small digest optimization