Native Compilation

What is Pyvorin?

Pyvorin is a native Python acceleration platform. It takes the parts of your code that fit a supported subset - loops, transforms, reductions, string operations - and compiles them to native machine code via LLVM. Everything else continues to run on CPython, with full transparency when fallback occurs.

Three steps to native speed

No rewrite. No new language. Pyvorin works with standard Python and returns standard Python results.

1

Analyse

Pyvorin parses your module into an AST, performs type inference and checks every construct against the supported-subset registry.

2

Compile

Valid AST nodes are lowered to LLVM IR, optimised and compiled into a native shared object (.so on Linux, .dylib on macOS, .dll on Windows).

3

Execute

The native module is loaded back into the Python process via ctypes. Results are returned as native Python objects. Fallback paths route to CPython when needed.

Strict mode

When strict mode is enabled, Pyvorin raises a clear compilation error if any part of the target function uses an unsupported construct. This guarantees you never silently fall back to CPython inside a hot path.

Disable strict mode and Pyvorin will compile what it can, automatically routing unsupported operations to CPython with a fallback report so you always know what ran natively and what did not.

Fallback reporting

Every fallback is logged with a reason code - for example UNSUPPORTED_AST_NODE, TYPE_INFERENCE_FAILED or EXTERNAL_C_EXTENSION.

Reports include line numbers, the offending construct and a suggested rewrite or workaround where one exists. This keeps your CI pipeline transparent and your performance expectations honest.

Supported vs unsupported features

Pyvorin supports a growing subset of Python. Unsupported constructs trigger fallback or a strict-mode error.

Feature Status Notes
List / dict / tuple literals Supported Fully typed and lowered to LLVM.
Numeric loops (for / while) Supported Bounds must be inferable at compile time or via loop variables.
List comprehensions Supported Filter/map patterns are the highest-performing workloads.
String operations Supported Tokenisation, splitting and parsing are heavily optimised.
Datetime / timestamp arithmetic Supported Feature-engineering kernels show strong speed-ups.
def functions with typed args Supported Type hints improve inference; untyped args use best-effort.
class definitions Limited Simple data classes are supported; complex metaclasses are not.
try / except Limited Basic exception handling is compiled; re-raise patterns may fallback.
eval / exec Unsupported Runtime code generation cannot be statically compiled.
Arbitrary C extensions Unsupported Extensions that rely on CPython internals are not lowered to LLVM.
Async / await Planned On the roadmap for a future release; currently falls back.

Get running in three commands

Install the thin client, activate your licence and point Pyvorin at any Python script. The compiler decides what can be accelerated and reports the rest.

1

Install

One package, no heavy toolchain required.

2

Activate

Licence verification is online by default; offline tokens available for air-gapped environments.

3

Run

Pyvorin compiles on first run and caches the result for subsequent invocations.

bash
# Install the thin client
pip install pyvorin-thin \
  --extra-index-url https://pypi.pyvorin.com/simple

# Activate your licence
pyvorin licence activate <KEY>

# Run with acceleration
pyvorin run script.py

API endpoint: https://api.pyvorin.com (default)

Override with environment variable PYVORIN_API_URL.