Menu
Instagram open sources high-performance Python fork

Instagram open sources high-performance Python fork

By making the Cinder project publicly available, social media giant wants to open conversation about upstreaming its performance optimisations to standard Python.

Credit: Dreamstime

Instagram’s Cinder, a performance-oriented fork of CPython 3.8, is now available as Facebook Incubator project on GitHub. The goal of releasing the code was to produce a unified, faster CPython, the social media giant said.

Instagram made Cinder publicly available to generate conversation about upstreaming some of the work to CPython, which is the reference implementation of Python, and reducing duplication of work pertaining to CPython performance.

Cinder features performance optimisations including bytecode inline caching, eager evaluation of coroutines, a method-at-a-time JIT compiler, and an experimental bytecode compiler that uses type annotations to emit type-specialised bytecode that runs better in the JIT. However, Cinder is neither polished nor documented for anyone’s use.

Furthermore, Instagram said there is “no capacity” to support Cinder as an open source project, nor any desire for it to become an alternative to CPython.

The developers of Cinder said the goal is to make sure Cinder is sufficiently stable and fast for their production workload but they make no assurances about its stability or correctness or performance for any other workload. They extended an invitation for feedback from anyone who knows how to make Cinder faster.

Cinder’s inline caching implementation observes optimisable cases in the execution of generic Python opcodes and dynamically replaces those opcodes with specialised versions.

For eager coroutine evaluation, if a call to an async function is immediately awaited, the platform executes the called function up to its first await. If the called function reaches a return without needing to await, Cinder will return that value directly without creating a coroutine object or deferring to the event loop. This provides a CPU optimisation in an async-heavy workload.

Cinder is built and tested on Linux x64. Other platforms, such as MacOS, probably will not work, the developers said.


Follow Us

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags pythonInstagram

Events

Featured

Slideshows

Channel kicks 2021 into gear as After Hours returns to Auckland

Channel kicks 2021 into gear as After Hours returns to Auckland

After Hours made a welcome return to the channel social calendar with a bumper crowd of partners, distributors and vendors descending on The Pantry at Park Hyatt in Auckland to kick-start 2021.

Channel kicks 2021 into gear as After Hours returns to Auckland
The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards

The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards

Hundreds of leaders from the New Zealand IT industry gathered at the Hilton in Auckland on 17 November to celebrate the finest female talent in the Kiwi channel and recognise the winners of the Reseller News Women in ICT Awards (WIICTA) 2020.

The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards
Show Comments