Miscellaneous native operations#
This is a list of various non-type-specific operations that have custom native implementations. If an operation has no native implementation, mypyc will use fallback generic implementations that are often not as fast.
Operations specific to various primitive types are described in the following sections.
x is y(this is very fast for all types)
isinstance(obj, type: type)
isinstance(obj, type: tuple)
getattr(obj, attr, default)
setattr(obj, attr, value)
slice(start, stop, step)
These variants of statements have custom implementations:
for ... in seq:(for loop over a sequence)
for ... in enumerate(...):
for ... in zip(...):