About Anaconda Help Download Anaconda

Mypyc compiles Python modules to C extensions. It uses standard Python type hints to generate fast code.

copied from cf-staging / mypyc

Installers

  • linux-ppc64le v1.13.0
  • linux-aarch64 v1.13.0
  • win-64 v1.13.0
  • linux-64 v1.13.0
  • osx-64 v1.13.0
  • osx-arm64 v1.13.0

conda install

To install this package run one of the following:
conda install conda-forge::mypyc

Description

The compiled language is a strict, gradually typed Python variant. It restricts the use of some dynamic Python features to gain performance, but it's mostly compatible with standard Python.

Mypyc uses mypy to perform type checking and type inference. Most type system features in the stdlib typing module are supported.

Compiled modules can import arbitrary Python modules and third-party libraries. You can compile anything from a single performance-critical module to your entire codebase. You can run the modules you compile also as normal, interpreted Python modules.

Existing code with type annotations is often 1.5x to 5x faster when compiled. Code tuned for mypyc can be 5x to 10x faster.

Mypyc currently aims to speed up non-numeric code, such as server applications. Mypyc is also used to compile itself (and mypy).


© 2024 Anaconda, Inc. All Rights Reserved. (v4.0.6) Legal | Privacy Policy