You may want to consider implementing those functions inline with the class definition first, to see if avoiding the function call overhead has any measurable improvement on performance.