1. Avoid many virtual calls to cons() by using the underlying static factory method.
2. Avoid the creation of many functions by introducing the createInv() static method.