Releases: tonybaloney/Pyjion
Releases · tonybaloney/Pyjion
v1.0.0
Announcing the first stable release of Pyjion!
What's Changed
- Improve performance of CALL_METHOD by @tonybaloney in #258
- Update to .NET 6 (preview 3) by @tonybaloney in #260
- Optimize COMPARE_OP for floats by @tonybaloney in #261
- Add simple test for function declaration by @tonybaloney in #259
- Remove old escaping/boxing API by @tonybaloney in #265
- Update internal opcode and opargs to fixed width types by @tonybaloney in #263
- Fix native disassembly offset reporting by @tonybaloney in #269
- Patch to 6.0.100-preview.4.21255.9 by @tonybaloney in #273
- Do escape analysis and unbox floats for binary operations (where it makes sense) by @tonybaloney in #271
- Use a different compile flag for instruction graphs by @tonybaloney in #275
- Optimizations table now reflect that OPT-4 is enabled by default by @thedrow in #278
- Unbox integers by @tonybaloney in #276
- Refactor absint to use consistent types for opcode index, opcode and oparg by @tonybaloney in #281
- Unbox boolean values by @tonybaloney in #283
- fix typo by @jugmac00 in #284
- Implement LOAD_FAST, STORE_FAST and LOAD_CONST for unboxed values. by @tonybaloney in #285
- Fix CALL_METHOD assertions by @tonybaloney in #292
- Update to .NET 6 preview 5 by @tonybaloney in #294
- Add a runpy entrypoint by @tonybaloney in #295
- Add a python API for instruction graphs. by @tonybaloney in #297
- Change the import to not throw a system exit signal. by @tonybaloney in #298
- Add some extra tests for the test_ast crash by @tonybaloney in #293
- Implement generators and the YIELD_VALUE opcode by @tonybaloney in #277
- Remove overuse of size_t with fixed-width types to avoid runtime errors by @tonybaloney in #305
- Add a pickle test and a spectral norm benchmark by @tonybaloney in #307
- Fix NumPy comparison operators returning arrays being yielded back to bools by @tonybaloney in #313
- Fix pyyaml decoding on PGC compile by @tonybaloney in #311
- Correct the ord() asserted return type by @tonybaloney in #316
- Print offsets as comments to help the lexers by @tonybaloney in #317
- Integer power and inplace power will always yield an abstract big integer (native python long) by @tonybaloney in #318
- Update to preview 6 by @tonybaloney in #320
- Make the instruction dumps easier to read by @tonybaloney in #321
- Add a symbol table and improve the disassembler output by @tonybaloney in #322
- Fix a bug where the contains operation wasn't being checked for null values by @tonybaloney in #324
- Initialize the JIT after import. by @tonybaloney in #319
- Clean up some forward declaration warnings by @tonybaloney in #325
- Fix a bug in floating point arithmetic with negative values by @tonybaloney in #327
- Refactor tests into base class. Fix crash on import from cache by @tonybaloney in #314
- Rewrite documentation by @tonybaloney in #332
- Fix the native disassembler double line break by @tonybaloney in #333
- Implement a better Pyjion CLI by @tonybaloney in #334
- Fix the crashing macOS test by @tonybaloney in #335
- Update init.py by @AlexWaygood in #337
- LOAD_BUILD_CLASS will infer a function type instead of Any by @tonybaloney in #338
- Remove stelem by @tonybaloney in #340
- Add abstract types for all builtins by @tonybaloney in #339
- Test all builtins by @tonybaloney in #342
- More unit tests by @tonybaloney in #343
- Capture optimisations made in compilation by @tonybaloney in #344
- Conditional branches in instruction graph by @tonybaloney in #346
- Fix branch yield by @tonybaloney in #347
- Add the nqueens and xml etree benchmarks. by @tonybaloney in #341
- Fixed a deoptimization bug. by @tonybaloney in #348
- Fix a regression on unboxed integers, caused by PGC values being set as Any by @tonybaloney in #350
- Math float miscalculation by @tonybaloney in #351
- Pyjion will infer that
range(n)
generates integers in iterator to improve unboxing by @tonybaloney in #353 - .NET 6 Preview7 by @tonybaloney in #358
- try..except statements. by @tonybaloney in #355
- Update jump instructions by @tonybaloney in #362
- update to .net6 rc1 by @tonybaloney in #364
- Windows ssize patch by @tonybaloney in #365
- Adopt the new 3.10 frame state fields by @tonybaloney in #363
- Add exception check for LOAD_METHOD by @tonybaloney in #370
- Implement PEP626 for 3.10 by @tonybaloney in #371
- Make 3.10 the main develop branch by @tonybaloney in #374
- Add a test for the strides crash by @tonybaloney in #376
- Change the API to have a single config method by @tonybaloney in #380
- Update JitInfo to include the tracing and profiling by @tonybaloney in #383
- Apple Arm64 support by @tonybaloney in #386
- Update to 3.10 proper by @tonybaloney in #387
- Relocation implementations for ARM by @tonybaloney in #388
- Add a truthy float test for ARM64 by @tonybaloney in #389
- Dont try native dis on anything other than x64 by @tonybaloney in #390
- Implement generators for 3.10 by @tonybaloney in #385
- Fix the way optimization levels are set and add a test for it by @tonybaloney in #395
- Reformat C++ code using CLang-format by @tonybaloney in #394
- Add a specialised container type pattern by @tonybaloney in #396
- Linux ARM64 builds by @tonybaloney in #398
- add PGC to STORE_FAST by @tonybaloney in #397
- Fixes #401 by @tonybaloney in #402
- Update to .NET 6 RC2 by @tonybaloney in #403
- Create an unboxed big integer type by @tonybaloney in #405
- Improve function call performance by @tonybaloney in #406
- Rip out bigints by @tonybaloney in #409
- Add an option to optimistically unbox integers when the values were observed to be "small" by @tonybaloney in #411
- Add an unboxed range iterator by @tonybaloney in #412
- Fix the optimization flag numbers by @tonybaloney in #418
- 1.0 release by @tonybaloney in #416
- Observe class attributes to establish a better graph by @tonybaloney in #419
New Contributors
- @thedrow made their first contribution in #278
- @jugmac00 made their first contribution in #284
- @AlexWaygood made their first contribution in #337
**Full Changelog...
1.0.0rc4
- Added ARM64 for Apple macOS (M1 Silicon). The JIT will emit native ARM64 assembly. Disassembler not supported.
- Added Linux/ARM64 support and a manylinux wheel
- Added Windows/ARM64 support
- All JIT configuration is now set using the
pyjion.config()
function instead ofenable_feature()
/disable_feature()
- Fixed a bug where
pyjion.graph()
would cause an exception if graphing was not enabled when the function was compiled - Added support for the
SETUP_ANNOTATIONS
opcode - Added support for generators in 3.10
- Fixed a bug in the DUP_TOP_TWO opcode with escaped variables
- UNPACK_SEQUENCE will emit types for constant tuples of string, int and float
- STORE_FAST is now profiled during the probe stage of PGC, leading to drastically improved performance in many cases where unboxed ints and floats can be used
- Added a simple benchmark suite script (
Tests/benchmarks/suite.py
) - Upgraded scikit-build to 0.12 for native VS2019 support
1.0.0rc3
- Updated to .NET 6 RC1
- Added Python 3.10 support
- Experimental
try..except
statements, stacked exception handlers and exception filtering. Disabled by default - Fixed a bug on LOAD_METHOD not raising an exception immediately if the method could not be resolved
- Remove
enable_tracing()
andenable_profiling
functions in 3.10 builds. Profiling and tracing is detected on compilation and available via the.info()
method - Added support for PEP626 (fast line tracing)
- Extended profiling support for CFunction calls
- PyTrace_RETURN now correctly sends the return value as an argument as per CPython spec
- Fixed a bug causing SEG when range iterators are escaped
1.0.0rc2
- BINARY_MULTIPLY and BINARY_POWER will assume the resulting integer is a big integer (not unboxed)
- Introduced two optimizations IntegerUnboxingMultiply and IntegerUnboxingPower which are applied at optimization level 2. Try level two if you work with integers, but at smaller values to see better performance.
- Pyjion will infer that
range(n)
generates integers in iterator to improve unboxing - LOAD_BUILD_CLASS will infer a function type instead of Any (#42)
- Instruction graphs will include the name of fast locals
- Instruction graph const values are capped to 40 characters
- Added abstract types for all builtins (#339)
pyjion.info()
will now return a JitInfo object- Optimization flags that were applied to a function during compilation are available in
JitInfo.optimizations
- All optimizations are now runtime flags instead of compile-time features
- Unboxing PGC errors will raise
pyjion.PyjionUnboxingError
(ValueError) instead of ValueError - Instruction graphs will show conditional branches (in orange)
- Fixed a bug in generators where mixed unboxed/boxed fast locals would yield the wrong values with PGC between the first and second compilation stages
- Fixed a de-optimization that happened in rc1 due to PGC asserting the abstract kind on the profiling phase and then always asserting that integers were big-integers
- Fixed a bug where unboxed locals were decrefing frame locals on yield
- Generators will not unbox fast locals for stability reasons
- Fixed a regression on unboxed integers, caused by PGC values being set as Any
- Assert return types for float object methods (as_integer_ratio, conjugate, is_integer, hex)
1.0.0rc1
- Added
pyjion
command-line script to complement thepython -m pyjion
command - The pyjion CLI has flags for enabling profiling, tracing, optimization level, graphs and debugging
- Unboxing integers that don't fit into
long long
will raise a ValueError. - Pyjion will mark any values above 1 billion as "big integers" and not escape them to reduce the chance of overflows.
- Floating point
__pow__
with negative values matches all behaviour of CPython - Raising
0
to a negative power will raise aZeroDivisionError
- PGC no longer uses a reference to probed values, dramatically reducing memory consumption between the first and second compile cycles
- Fixed a bug where
statistics.variance([0, 0, 1])
would raise an assertion error because of an overflow raised in Fraction arithmetic (#326) - Fixed a bug on calling
sys.settrace(None)
would cause a segmentation fault (#330) - Fixed a bug on optimized calls to custom types would crash on the 3rd execution because of the way PGC held and released references.
- Refactored Pyjion's test suite to Pytest
- Rewrote the documentation site
- Fixed a bug in the native disassembler printing empty comment lines
- Corrected the type signature of
pyjion.get_offsets()
- Fixed a bug on changed methods for object (like a global) causing crashes because of the way load_method was optimized (#335)
1.0.0b7
- Added
pyjion.symbols(callable)
API to fetch the dictionary of external call tokens - Extended the
dis()
anddis_native()
methods with a flag to not print the program counter (print_pc=False
) - Improved the
dis_native()
method to print the name of the method call after thecall
instructions as a line comment - Fixed a bug in
dis_native()
which showed unresolved sequence points at the top of the printout - Fixed a bug where
in
(CONTAINS_OP) result wasn't being checked for exceptions and the next operation would segfault if thein
operation returned an error result. - The IL in
dis()
is closer in syntax to ILDasm and easier to read - Added a
pyjion.status()
method to get runtime data on the JIT - Windows will now observe the
DOTNET_ROOT
andDOTNET_LIB_PATH
environment variables
1.0.0b6
- Updated to .NET 6 preview 6
- Fixed a bug where
ord()
builtin would return the wrong type (#315) pyjion.dis.dis()
andpyjion.dis.dis_native()
will show sequence points as comments- The BINARY_POWER and INPLACE_POWER opcodes will always return a native python long instead of an escaped integer, to avoid overflows
0.13.0
- The compiler will now fail (and default back to CPython) if .NET emits a FAST_FAIL helper
- UNPACK_SEQUENCE is rewritten to be more efficient and use optimized paths for LIST and TUPLE types
- f-string (BUILD_STRING) is rewritten to be more efficient
- UNPACK_EX is rewritten to remove the requirement for dynamic heap allocation (and the stack canary) and leverage .NET compiler's dynamic eval stack
- PGC implemented for UNPACK_SEQUENCE
- PGC implemented for BINARY_SUBSCR
- PGC implemented for CALL_FUNCTION/OPT-14
0.11.0
- Added OPT-13 (OPTIMIZE_TYPESLOT_LOOKUPS) to optimize the type slots for all binary operators and resolve the precedence at compile-time (only for known types)
- Added OPT-14 (OPTIMIZE_FUNCTION_CALLS) to optimize calls to builtin functions
- Optimize all frame locals by determining abstract types on compilation
- Bugfix: Fixed a crash on f-strings with lots (>255) arguments
- Bugfix: Will now skip all functions containing the use of
exec()
as it contains frame globals which are not supported - Updated to .NET 5.0.3
- Updated the containers to Ubuntu 20
- Added fileobject abstract type
- Added enumerator abstract type
- Added code object abstract type
- Added integration tests for reference leaks for all binary operations (thanks @amaeckelberghe)
- Added module type (thanks @vacowboy75)
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