Eliminate repeated virtual calls