function and polymorphism benchmarks