Pyconsg2014 pyston

20
Nightly Pyston and Performance Nakamura Masato(@Masahito) from Japan version #pyconsg

description

pyston

Transcript of Pyconsg2014 pyston

Page 1: Pyconsg2014 pyston

Nightly Pyston and Performance

Nakamura Masato(@Masahito) from Japan version #pyconsg

Page 2: Pyconsg2014 pyston

Who are you?(お前、誰よ by Ian Lewis)

• @Masahito from Japan

• P2P File Transfer Engineer at Skeed .inc

• I work with Scala & JVM(Sorry!)

• We use Python for Implementation the CLI, and, to deploy the P2P client(fabric etc)

Page 3: Pyconsg2014 pyston

 Attention I do not have the implementation of

Pyston. The only explanation this time ;-)

Page 4: Pyconsg2014 pyston

What is Pyston?

Page 5: Pyconsg2014 pyston

What is Pyston?• develop : Dropbox(https://tech.dropbox.com/2014/04/introducing-pyston-an-upcoming-jit-based-python-implementation/)

• JIT(Just in Time)-based implementation of the Python 2.7 language.

• Python implementation built using LLVM and modern JIT techniques

• only runs on x86_64 platforms, and only has been tested on Ubuntu.

Page 6: Pyconsg2014 pyston

Python Code to LLVM IR The IR is then run through the LLVM optimizer and passed off to the LLVM JIT engine,

Run Mechanism

Page 7: Pyconsg2014 pyston
Page 8: Pyconsg2014 pyston

How to install• Binary is not provided

• build required(https://github.com/dropbox/pyston/blob/master/docs/INSTALLING.md)It's written carefully, it works roughly.(It does not work? Let's do our best!)

Page 9: Pyconsg2014 pyston

!

Current state

• It does not correspond to the input of the line breaks in the REPL

• It does not correspond to the basic grammar other than the Python(not generator , list comprehension etc)lambda is coming!

• Library is not implemented almost it's current status. You can not use only about ”time.time” far

Page 10: Pyconsg2014 pyston

 Benchmark!

Page 11: Pyconsg2014 pyston

precondition• compared in the following environments.(on Ubuntu12.04 and vagrant (VirtualBox 2CPU)

• Python v2.7.X

• PyPy v2.2.1

• Pyston v0.1(2014/04/15)

Page 12: Pyconsg2014 pyston

Recursion

Page 13: Pyconsg2014 pyston

Recursion(Second) Recursion

Second

Page 14: Pyconsg2014 pyston

Loop

Page 15: Pyconsg2014 pyston

Loop (Second)

loopSecond

Page 16: Pyconsg2014 pyston

Summary: There is an effect in the recursion of LLVM JIT.

Effect is difficult to come out in the loop of LLVM JIT.

Page 17: Pyconsg2014 pyston

planned for 0.2

Missing large parts of the language !

Exceptions (planned for 0.2) Class inheritance (planned for 0.2) Default arguments, keywords, starargs, kwargs (planned for 0.2) Generators (planned for 0.2) Integer promotion (planned for 0.2) Threads

Page 18: Pyconsg2014 pyston

Information Source• [Introducing Pyston: an upcoming, JIT-based Python implementation] https://tech.dropbox.com/2014/04/introducing-pyston-an-upcoming-jit-based-python-implementation/

• https://github.com/dropbox/pyston/blob/master/README.md

• [LLVM overview 20110122] http://www.slideshare.net/nothingcosmos/llvm-overview-20110122

Page 19: Pyconsg2014 pyston

Thank you! !

ありがとう!

Page 20: Pyconsg2014 pyston

See you again in PyconJP 2014! Deadline for talk proposals is

20th June.