Pyjion

Latest version: v2.0.0

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

0.10.0

* Added OPT-12 (OPTIMIZE_BUILTIN_METHOD) to pre-lookup methods for builtin types and bypass LOAD_METHOD (PyObject_GetMethod)
* Optimized LOAD_METHOD to recycle lookups for the same object
* Expanded OPT-8, OPT-9, OPT-11, OPT-12 for nested stacks (e.g. inside expressions)
* Added a frozen set abstract type

0.9.0

* Added OPT-11 (OPTIMIZE_BINARY_SLICE) to optimize the BUILD_SLICE and BINARY_SUBSCR operations into a single function when the slice start, stop and step is None or a const number.
* Fixed a bug in the set_optimization_level() being reset (thanks tetsuo-cpp)
* Added a bytearray abstract value kind (thanks tetsuo-cpp)
* Added a type abstract value kind (thanks tetsuo-cpp)
* Optimized the compiled instructions to only update the frame last instruction field on error/exit branch
* Removed the "periodic work" method which was called for every for/while loop and put a function to call Py_MakePendingCalls for every 10th loop
* Added an improvement to the process stage to infer the abstract types of return values to methods of builtin types, e.g. str.encode
* Added a check in dis_native for when the compiled function wasn't compiled (thanks tetsuo-cpp)
* dis_native will now pretty print the assembly code when the `rich` package is installed (thanks C4ptainCrunch)
* `pyjion[dis]` is a new package bundled with pystorm3 and rich (thanks C4ptainCrunch)

0.8.0

* Enhanced the process stage of the compiler with new abstract types, iterable, bytearray, codeobject, frozenset, enumerator, file, type and module
* Process stage will assert the abstract return type of any call to a builtin function (e.g. list(), tuple()), which will kick in the optimizations for a broader set of scenarios
* Added OPT-8 (OPTIMIZE_BINARY_FUNCTIONS) to combine 2 sequential binary operations into a single operation. Adds about 15-20% performance gain on PyFloat operations.
* Added OPT-9 (OPTIMIZE_ITERATORS) to inline the FOR_ITER opcode of a listiter (List iterator) into native assembly instructions.
* Added OPT-10 (OPTIMIZE_HASHED_NAMES) to precompute the hashes for LOAD_NAME and LOAD_GLOBAL dictionary lookups
* Fixed a bug where looking up a known hash for a dictionary object (optimized BINARY_SUBSCR) wouldn't raise a KeyError. Seen in 157

0.7.0

* Fixed a bug in JUMP_IF_FALSE_OR_POP/JUMP_IF_TRUE_OR_POP opcodes emitting a stack growth, which would cause a stack underflow on subsequent branch checks. JIT will compile a broader range of functions now
* Implemented PEP590 vector calls for methods with 10+ arguments (thanks tetsuo-cpp)
* Implemented PEP590 vector calls for functions with 10+ arguments
* Fixed a reference leak on method calls with large number of arguments
* Support for tracing of function calls with 10+ arguments
* Disabled OPT-4 as it is causing reference leaks

0.6.0

* Added OPT-6 optimization. Frame constants are now used to speed up assignments to lists and dictionaries. STORE_SUBSCR will assert if something is a list, or dict and shortcut
the assignment logic.
* Added OPT-7 optimization. The binary subscript operator is compiled to faster path under a set of circumstances, especially if the index/key is a frame constant. Hashes are precomputed
and indexes for integer constants are converted to native numbers at compile-time.
* The native machine-code disassembler will show the actual position of the JITed code in memory, instead of starting the offset at 0
* The `pyjion.dump_native()` function returns a tuple with bytes, length and position
* Type inferencing has been improved for all inplace and binary operations
* Windows builds from source are fixed for when the user wants to compile against a checkout of .NET
* Implemented FAST_DISPATCH for additional opcodes
* Added a test runner for the CPython regression suite that tests the JIT in isolation
* Fixed a reference leak of (self) for the LOAD_METHOD opcode
* Fixed a reference leak of non C functions being called via Call<N> (CALL_FUNCTION)
* Fixed a bug where (very) large tuples being created via the BUILD_TUPLE opcode would cause an overflow error
* Fixed a bug on BUILD_MAP being called with very large dictionaries caused a fatal error

0.5.0

* Added OPT-4 optimization. Frame locals (named variables known at compilation) using the LOAD_FAST, STORE_FAST and DELETE_FAST
opcodes will use native .NET locals instead of using the frame's f_localsplus array.
* Improved performance in LOAD_FAST and STORE_FAST through OPT-4
* Added OPT-5 optimization. Frame push/pop on entry/exit are now inline CIL instructions.
* LOAD_FAST skips unbound local checks when proceeded by a STORE_FAST (i.e. slot is definitely assigned)

Page 4 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.