Optimize calling of primitives