At compile-time, you can turn them off completely with -contracts:none
At run-time, you can turn off checks like so:
CobraCore.willCheckInvariant = false
CobraCore.willCheckEnsure = false
# there are 5 CobraCore shared properties for this:
pro willCheckInvariant from var
pro willCheckRequire from var
pro willCheckEnsure from var
pro willCheckAssert from var
pro willCheckNil from var
.willCheckNil affects (1) checking that parameters with non-nil reference types are not nil and (2) casts such as "x to !"
Using these won't completely eliminate overhead, but will greatly reduce it.
I agree these should be available as compile-time options that affect the code generation. I encourage you to
submit your first ticket.