Polymorphic dispatch example with geometric objects to demonstrate ahead of time compilation with profiling