GithubHelp home page GithubHelp logo

facebookexperimental / skybison Goto Github PK

View Code? Open in Web Editor NEW
287.0 20.0 21.0 62.23 MB

Instagram's experimental performance oriented greenfield implementation of Python.

License: Other

CMake 0.71% Python 27.20% Shell 0.03% C 1.57% C++ 70.49%

skybison's Introduction

Welcome to Skybison!

A note on development

Development has moved to tekknolagi/skybison

What is Skybison?

Skybison is experimental performance-oriented greenfield implementation of Python 3.8. It contains a number of performance optimizations, including: small objects; a moving GC; hidden classes; bytecode inline caching; type-specialized bytecode; an experimental template JIT.

Is this supported?

No.

Even though the project is no longer under active development internally, we've made Skybison publicly available in the hopes that people might find its history and internals interesting, or maybe even useful. It has not been polished or documented for anyone else's use.

We cannot commit to fixing external bug reports or reviewing pull requests. That said, if you have experience in dynamic language runtimes and have ideas to make Skybison faster; or if you work on CPython and want to use Skybison as inspiration for improvements in CPython, feel free to open a Pull Request.

Instagram is now developing Cinder.

How do I build it?

See INSTALL.md for an overview. However, this project was built in an internal development environment. We cannot guarantee that this project will build or run on any arbitrary environment.

What's here?

The project is structured in the following component directories:

./runtime

The core of the runtime resides here. In it is all of the core types, core modules, bytecode interpreter, and template JIT.

  • objects.[h|cpp] - All object types. See object-model.md.
  • *-builtins.[h|cpp] - Basic functionality of builtin types
  • *-module.[h|cpp] - Implementation of built-in modules and types correlated to a module.
  • interpreter.[h|cpp] - Implementation of all opcodes. See execution-model.md.
  • runtime/interpreter-gen-x64.cpp - Implementation of the assembly interpreter and template JIT.
  • heap.[h|cpp] - Class that manages managed objects. See garbage-collection.md.
  • runtime.[h|cpp] - The Runtime. This is where everything starts.

./library

The Python library code resides here. In it is a Skybison-specific set of library files and their tests. It is meant to be overlaid on top of the CPython standard library so that imports fall back on standard library code.

./capi and ./ext

Our C-API emulation layer resides here. Since any C code that interfaces with Python's C-API expects PyObject* not to move, and the runtime has a moving GC, we have built a layer of handle objects and C-API functions.

The structure inside this ./ext is designed to mimic the CPython repo. For example, CPython defines PyLong_FromLong in Objects/longobject.c. In Skybison, this function should be implemented in ext/Objects/longobject.cpp.

./third-party

We vendor several open-source projects for both testing and core functionality. They all reside here. Included in this list is a version of CPython, which we use for its Python and C library code.

./util

Development tools and helper scripts for building and debugging.

./benchmarks

Set of standard Python benchmarks with an accompanying test-runner.

./doc

This folder contains documentation.

Other notes

The repository has the name "pyro" sprinkled throughout the codebase. This is a holdover from an old internal codename.

License

Please see LICENSE.

skybison's People

Contributors

amyreese avatar atalaba avatar brandonthebuilder avatar brittanyrey avatar czardoz avatar d1jang avatar davidcallahan avatar dulinriley avatar eduardo-elizondo avatar fried avatar haoruzhao188 avatar hmansell avatar iahs avatar jbower-fb avatar jfix71 avatar jtbraun avatar m-avlani avatar maggiemoss avatar matzeb avatar mpage avatar naveedgol avatar pixelb avatar rahulg avatar sinancepel avatar stanislavglebik avatar swtaarrs avatar tekknolagi avatar thatch avatar wmeehan avatar zertosh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.