Performance Analysis and Benchmarking of Python Workloads

Total Page:16

File Type:pdf, Size:1020Kb

Performance Analysis and Benchmarking of Python Workloads Performance Analysis and Benchmarking of Python Workloads Arthur Crapé Student number: 01502848 Supervisor: Prof. dr. ir. Lieven Eeckhout Master's dissertation submitted in order to obtain the academic degree of Master of Science in Computer Science Engineering Academic year 2019-2020 Performance Analysis and Benchmarking of Python Workloads Arthur Crapé Student number: 01502848 Supervisor: Prof. dr. ir. Lieven Eeckhout Master's dissertation submitted in order to obtain the academic degree of Master of Science in Computer Science Engineering Academic year 2019-2020 PREFACE i Preface It is remarkable how engineering is not confined to its own field. Rather, it shows the student the importance of knowledge. Five years ago, I took on the challenge of getting through university, but little did I know that was only part of the puzzle. Somehow, the mathematics, the physics and the computer science made me realize how fascinating, riveting and compelling today’s world is. They showed me that a degree is not a one-way ticket to success and that the road to success is never-ending. This master’s dissertation might put an end to five inspiring, insightful and exciting years of engineering, but it is only the start of the bigger picture. However, success is achieved by your own rules and those achievements should be cherished, appreciated and acknowledged. For this, I would like to express my deepest gratitude to my supervisor Prof. Dr. Ir. Lieven Eeckhout. The weekly meetings, practical suggestions and the helpful advice were instrumental for the realisation of this dissertation. Thanks should also go to Dr. Ir. Almutaz Adileh for his help at the beginning of this academic year. Last but not least, I cannot begin to express my thanks to my family and friends, who have supported me throughout the years and have proven, one by one, to be invaluable and irreplaceable. Thank you. PERMISSION OF USE AND CONTENT ii Permission of Use and Content “The author(s) gives (give) permission to make this master dissertation available for con- sultation and to copy parts of this master dissertation for personal use. In all cases of other use, the copyright terms have to be respected, in particular with re- gard to the obligation to state explicitly the source when quoting results from this master dissertation.” Arthur Crapé, May 27, 2020 Performance Analysis and Benchmarking of Python Workloads Arthur Crapé Master’s dissertation submitted in order to obtain the academic degree of Master of Science in Computer Science Engineering Academic year 2019-2020 Supervisor: Prof. Dr. Ir. L. Eeckhout Faculty of Engineering and Architecture Ghent University Abstract As Python is becoming increasingly more popular, several alternatives to the standard Python implementation called CPython have been proposed. There exists numerous re- search regarding benchmarking of these approaches, but they either contain too few bench- marks, too many, do not represent the current industrial applications or try to draw con- clusions by focusing solely on the metric time. This thesis identifies the main shortcomings of current Python benchmark systems, presents a thorough clarification of the underlying meaning of the principal components of Python implementations, reports a scientifically based quantitative performance analysis and provides a framework to identify the most representative workloads from a sizeable set of benchmarks. Additionally, we apply the framework to a specific use-case, the Python JIT compiler implementation called PyPy. We rectify the speedup reported by the PyPy Speed center and find that a select number of benchmarks provide adequate results in order to draw similar conclusions as when using the entire benchmarking suite. Although this thesis applies the framework primarily on CPython versus PyPy, it is noted that the findings can be applied, and the recommenda- tions found in this thesis can be generalized, to other Python implementations. Index Terms Python, interpreters, PyPy, JIT, benchmarking, clustering PERFORMANCE ANALYSIS AND BENCHMARKING OF PYTHON WORKLOADS 2020 Performance Analysis and Benchmarking of Python Workloads Arthur Crape´ Supervisor: Lieven Eeckhout Abstract—As Python is becoming increasingly more developer of said implementations should have a popular, several alternatives to the standard Python good understanding of the various implementations implementation called CPython have been proposed. across the Python Ecosystem. There exists numerous research regarding benchmark- ing of these approaches, but they either contain too few benchmarks, too many, do not represent the current industrial applications or try to draw conclusions by II. BACKGROUND AND PROBLEM STATEMENT focusing solely on the metric time. This thesis identifies the main shortcomings of current Python benchmark A. Python Ecosystem systems, presents a thorough clarification of the under- lying meaning of the principal components of Python Contrary to compilers, an interpreter, in its implementations, reports a scientifically based quanti- simplest form, executes the generated processor- tative performance analysis and provides a framework comprehensive code directly and does not produce to identify the most representative workloads from an executable that can be distributed. The default a sizeable set of benchmarks. Additionally, we apply implementation of Python is CPython, an interpreted the framework to a specific use-case, the Python JIT compiler implementation called PyPy. We rectify the based implementation written in C, which can be speedup reported by the PyPy Speed center and find found on the main website of Python. that a select number of benchmarks provide adequate Next to interpreters, Python can also be imple- results in order to draw similar conclusions as when mented using a Just-In-Time compiler (JIT) such as using the entire benchmarking suite. Although this PyPy2, which compiles a program or certain parts thesis applies the framework primarily on CPython versus PyPy, it is noted that the findings can be thereof at runtime. At the heart of PyPy a hot-loop applied, and the recommendations found in this thesis identifier is located, which detects whether or not can be generalized, to other Python implementations. a certain part of the code is frequently used as Index Terms—Python, interpreters, PyPy, JIT, dynamically compiling code generally takes a long benchmarking, clustering time. We refer to the full dissertation for a complete I. INTRODUCTION overview of the Python Ecosystem. YTHON is a recent programming language P that focuses more on the ease and speed of B. Previous Work developing than other programming languages like The main benchmark suite that is often referred 1 Java or C do . It is considered more productive than to is the official Python Performance Benchmark other languages due to the fact that it uses less code Suite [1]. Firstly, the benchmarks from the official and comes with several useful libraries for, e.g., Python performance benchmark suite do not seem machine learning (ML) and web development. well grounded. According to the Python and PyPy To effectively run a program written in Python, speedcenters3, the benchmarks run only for at most one needs a Python implementation. Various imple- a few seconds, where most of them only run for a mentations exist, ranging from the default Python couple of milliseconds, a time frame on which a JIT interpreter called CPython to JIT compilers like implementation cannot show its strengths. PyPy and Numba to even static compilers such as Cython. It is apparent that both the user and the 2PyPy, an alternative Python implementation using a JIT: https://www.pypy.org/. 1The Python Programming Language can be found at: 3The Python and PyPy speedcenters can be found at: https://www.python.org/ https://speed.python.org/ and https://speed.pypy.org/. Secondly, the PyPerformance Benchmark Suite Finally, we investigate C-Extensions and conclude implementation uses an arbitrarily selected number more research is needed on this matter. of warm-ups for all benchmarks. As this research is a master’s dissertation, it was Benchmarking frameworks should not use an ar- decided to only focus on aforementioned points bitrarily selected number of iterations, must include in context of the standard implementation called benchmarks that take more than a few millisec- CPython versus the JIT compiler called PyPy. It onds and should use a statistically rigorous method. is apparent that these procedures can be carried Benchmark suites should also not include too many forward to other implementations. benchmarks in order for the suite to remain useful. Furthermore, none of the mentioned benchmark IV. KEY FINDINGS suites focus on trending applications of the Python We mention that for all of our results, we nor- language, namely ML. This gives rise to questions malize every metric by the number of instructions. such as whether or not a given speedup for a given Otherwise, we are unable to draw any meaningful implementation is even reliable at all, as the main conclusions. For PCA, we also scale our data so that application, ML for that matter, is not included in all of our normalized metrics reside in the [0, 1] the measurements. interval. Finally, the mentioned suites also only focus on For CPython, no important differences are noted the execution time. Although Redondo et al. [2] also when comparing startup and steady-state PC values. focus on memory usage, further research should go On the contrary, upon comparing startup and steady- into understanding the properties and characteristics state for PyPy, we find that several PCs experience of other metrics. different influences from the metrics they are built of, as shown on Figure 1. This is due to the different III. GOAL underlying behaviour of pure interpretation versus This thesis is built on four different research parts. JIT compilation. For this, a benchmarking framework was set-up to Alongside this, we find that PyPy requires more benchmark Python workloads in a statistically rigor- PCs in order to explain as much variance in the data ous way, similarly to Eeckhout et al.
Recommended publications
  • A Practical Solution for Scripting Language Compilers
    A Practical Solution for Scripting Language Compilers Paul Biggar, Edsko de Vries, David Gregg Department of Computer Science, Trinity College Dublin, Dublin 2, Ireland Abstract Although scripting languages are becoming increasingly popular, even mature script- ing language implementations remain interpreted. Several compilers and reimplemen- tations have been attempted, generally focusing on performance. Based on our survey of these reimplementations, we determine that there are three important features of scripting languages that are difficult to compile or reimplement. Since scripting languages are defined primarily through the semantics of their original implementations, they often change semantics between releases. They provide C APIs, used both for foreign-function interfaces and to write third-party extensions. These APIs typically have tight integration with the original implementation, and are used to providelarge standard libraries, which are difficult to re-use, and costly to reimplement. Finally, they support run-time code generation. These features make the important goal of correctness difficult to achieve for compilers and reimplementations. We present a technique to support these features in an ahead-of-time compiler for PHP. Our technique uses the original PHP implementation through the provided C API, both in our compiler, and in our generated code. We support all of these impor- tant scripting language features, particularly focusing on the correctness of compiled programs. Additionally, our approach allows us to automatically support limited fu- ture language changes. We present a discussion and performance evaluation of this technique. Key words: Compiler, Scripting Language 1. Motivation Although scripting languages1 are becoming increasingly popular, most scripting language implementations remain interpreted. Typically, these implementations are slow, between one and two orders of magnitude slower than C.
    [Show full text]
  • How to Access Python for Doing Scientific Computing
    How to access Python for doing scientific computing1 Hans Petter Langtangen1,2 1Center for Biomedical Computing, Simula Research Laboratory 2Department of Informatics, University of Oslo Mar 23, 2015 A comprehensive eco system for scientific computing with Python used to be quite a challenge to install on a computer, especially for newcomers. This problem is more or less solved today. There are several options for getting easy access to Python and the most important packages for scientific computations, so the biggest issue for a newcomer is to make a proper choice. An overview of the possibilities together with my own recommendations appears next. Contents 1 Required software2 2 Installing software on your laptop: Mac OS X and Windows3 3 Anaconda and Spyder4 3.1 Spyder on Mac............................4 3.2 Installation of additional packages.................5 3.3 Installing SciTools on Mac......................5 3.4 Installing SciTools on Windows...................5 4 VMWare Fusion virtual machine5 4.1 Installing Ubuntu...........................6 4.2 Installing software on Ubuntu....................7 4.3 File sharing..............................7 5 Dual boot on Windows8 6 Vagrant virtual machine9 1The material in this document is taken from a chapter in the book A Primer on Scientific Programming with Python, 4th edition, by the same author, published by Springer, 2014. 7 How to write and run a Python program9 7.1 The need for a text editor......................9 7.2 Spyder................................. 10 7.3 Text editors.............................. 10 7.4 Terminal windows.......................... 11 7.5 Using a plain text editor and a terminal window......... 12 8 The SageMathCloud and Wakari web services 12 8.1 Basic intro to SageMathCloud...................
    [Show full text]
  • Goless Documentation Release 0.6.0
    goless Documentation Release 0.6.0 Rob Galanakis July 11, 2014 Contents 1 Intro 3 2 Goroutines 5 3 Channels 7 4 The select function 9 5 Exception Handling 11 6 Examples 13 7 Benchmarks 15 8 Backends 17 9 Compatibility Details 19 9.1 PyPy................................................... 19 9.2 Python 2 (CPython)........................................... 19 9.3 Python 3 (CPython)........................................... 19 9.4 Stackless Python............................................. 20 10 goless and the GIL 21 11 References 23 12 Contributing 25 13 Miscellany 27 14 Indices and tables 29 i ii goless Documentation, Release 0.6.0 • Intro • Goroutines • Channels • The select function • Exception Handling • Examples • Benchmarks • Backends • Compatibility Details • goless and the GIL • References • Contributing • Miscellany • Indices and tables Contents 1 goless Documentation, Release 0.6.0 2 Contents CHAPTER 1 Intro The goless library provides Go programming language semantics built on top of gevent, PyPy, or Stackless Python. For an example of what goless can do, here is the Go program at https://gobyexample.com/select reimplemented with goless: c1= goless.chan() c2= goless.chan() def func1(): time.sleep(1) c1.send(’one’) goless.go(func1) def func2(): time.sleep(2) c2.send(’two’) goless.go(func2) for i in range(2): case, val= goless.select([goless.rcase(c1), goless.rcase(c2)]) print(val) It is surely a testament to Go’s style that it isn’t much less Python code than Go code, but I quite like this. Don’t you? 3 goless Documentation, Release 0.6.0 4 Chapter 1. Intro CHAPTER 2 Goroutines The goless.go() function mimics Go’s goroutines by, unsurprisingly, running the routine in a tasklet/greenlet.
    [Show full text]
  • IMPLEMENTING OPTION PRICING MODELS USING PYTHON and CYTHON Sanjiv Dasa and Brian Grangerb
    JOURNAL OF INVESTMENT MANAGEMENT, Vol. 8, No. 4, (2010), pp. 1–12 © JOIM 2010 JOIM www.joim.com IMPLEMENTING OPTION PRICING MODELS USING PYTHON AND CYTHON Sanjiv Dasa and Brian Grangerb In this article we propose a new approach for implementing option pricing models in finance. Financial engineers typically prototype such models in an interactive language (such as Matlab) and then use a compiled language such as C/C++ for production systems. Code is therefore written twice. In this article we show that the Python programming language and the Cython compiler allows prototyping in a Matlab-like manner, followed by direct generation of optimized C code with very minor code modifications. The approach is able to call upon powerful scientific libraries, uses only open source tools, and is free of any licensing costs. We provide examples where Cython speeds up a prototype version by over 500 times. These performance gains in conjunction with vast savings in programmer time make the approach very promising. 1 Introduction production version in a compiled language like C, C++, or Fortran. This duplication of effort slows Computing in financial engineering needs to be fast the deployment of new algorithms and creates ongo- in two critical ways. First, the software development ing software maintenance problems, not to mention process must be fast for human developers; pro- added development costs. grams must be easy and time efficient to write and maintain. Second, the programs themselves must In this paper we describe an approach to tech- be fast when they are run. Traditionally, to meet nical software development that enables a single both of these requirements, at least two versions of version of a program to be written that is both easy a program have to be developed and maintained; a to develop and maintain and achieves high levels prototype in a high-level interactive language like of performance.
    [Show full text]
  • Proseminar Python - Python Bindings
    Proseminar Python - Python Bindings Sven Fischer Student an der TU-Dresden [email protected] Abstract Diese Arbeit beschaftigt¨ sich damit, einen Einblick in die Benut- zung von externen Bibliotheken in Python zu geben und fuhrt¨ den Leser in das Schreiben von eigenen Erweiterungen ein. Daruber¨ hinaus wird darauf eingegangen, wie Projekte in anderen Program- miersprachen Python benutzen konnen.¨ Weiterhin wird kurz auf verschiedene andere Moglichkeiten¨ eingegangen, Python oder Py- thons Benutzung zu erweitern und zu verandern:¨ durch Kompilati- on, Mischen“ mit oder Ubersetzen¨ in anderen Sprachen, oder spe- ” zielle Interpreter. Abbildung 1. Vergleich der Moglichkeiten¨ Python zu erwei- tern (links) und Python einzubetten (rechts). Categories and Subject Descriptors D.3.3 [Programming Lan- guages]: Language Constructs and Features—Modules, packages 1. Daten von C nach Python konvertieren General Terms Languages, Documentation 2. Python Funktion mit konvertierten Werten aufrufen Keywords Python, Extension, Embedding, Library 3. Ergebnis von Python zuruck¨ nach C konvertieren 1. Einfuhrung¨ Diese Konvertierung ist auch das großte¨ Hindernis beim Ver- 1 Python wird mit einer umfangreichen Standartbibliothek ausgelie- knupfen¨ von Python und C , zumindest ist es mit einigem Aufwand fert. Trotzdem gibt es Grunde,¨ warum man Python um verschiedene verbunden. externe Bibliotheken erweitern mochte.¨ Ein Beispiel dafur¨ ware¨ die Es gibt einige Projekte, die sich mit dem Verandern¨ und Erwei- ¨ Geschwindigkeit, die bei Python als interpretierter Sprache nicht tern der Sprache Python beschaftigen.¨ Einen kurzen Uberblick uber¨ immer den Anforderungen entspricht. Weiterhin gibt es genugend¨ einige Moglichkeiten¨ gebe ich in Abschnitt4. Dort gehe ich auf Software von Drittanbietern, welche man in Python nutzbar ma- zwei Python-Interpreter neben dem in der Standard-Distribution chen will - ohne sie in Python zu ubersetzen.¨ Darauf gehe ich in enthaltenen ein und zeige Moglichkeiten¨ auf, Python in andere Abschnitt2 ein.
    [Show full text]
  • High-Performance Computation with Python | Python Academy | Training IT
    Training: Python Academy High-Performance Computation with Python Training: Python Academy High-Performance Computation with Python TRAINING GOALS: The requirement for extensive and challenging computations is far older than the computing industry. Today, software is a mere means to a specific end, it needs to be newly developed or adapted in countless places in order to achieve the special goals of the users and to run their specific calculations efficiently. Nothing is of more avail to this need than a programming language that is easy for users to learn and that enables them to actively follow and form the realisation of their requirements. Python is this programming language. It is easy to learn, to use and to read. The language makes it easy to write maintainable code and to use it as a basis for communication with other people. Moreover, it makes it easy to optimise and specialise this code in order to use it for challenging and time critical computations. This is the main subject of this course. CONSPECT: Optimizing Python programs Guidelines for optimization. Optimization strategies - Pystone benchmarking concept, CPU usage profiling with cProfile, memory measuring with Guppy_PE Framework. Participants are encouraged to bring their own programs for profiling to the course. Algorithms and anti-patterns - examples of algorithms that are especially slow or fast in Python. The right data structure - comparation of built-in data structures: lists, sets, deque and defaulddict - big-O notation will be exemplified. Caching - deterministic and non-deterministic look on caching and developing decorates for these purposes. The example - we will use a computionally demanding example and implement it first in pure Python.
    [Show full text]
  • Efficient Use of Python on the Clusters
    Efficient use of Python on the clusters Ariel Lozano CÉCI training November 21, 2018 Outline I Analyze our code with profiling tools: I cpu: cProfile, line_profiler, kernprof I memory: memory_profiler, mprof I Being a highly abstract dynamically typed language, how to make a more efficient use of hardware internals? I Numpy and Scipy ecosystem (mainly wrappers to C/Fortran compiled code) I binding to compiled code: interfaces between python and compiled modules I compiling: tools to compile python code I parallelism: modules to exploit multicores Sieve of eratostenes Algorithm to find all prime numbers up to any given limit. Ex: Find all the prime numbers less than or equal to 25: I 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Cross out every number displaced by 2 after 2 up to the limit: I 23 45 67 89 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Move to next n non crossed, cross out each non crossed number displaced by n: I 23 45 67 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 I 2 3 45 67 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 The remaining numbers non crossed in the list are all the primes below limit. 2 Trivial optimization: jump directlyp to n to start crossing out. Then, n must loop only up to limit.
    [Show full text]
  • Shed Skin Documentation Release V0.9.4
    Shed Skin Documentation Release v0.9.4 Mark Dufour the Shed Skin contributors Mar 16, 2017 Contents 1 An experimental (restricted-Python)-to-C++ compiler1 2 Documentation 3 2.1 Shed Skin documentation........................................3 2.1.1 Introduction...........................................3 2.1.2 Typing restrictions.......................................3 2.1.3 Python subset restrictions....................................4 2.1.4 Library limitations.......................................5 2.1.5 Installation...........................................6 2.1.5.1 Windows........................................6 2.1.5.2 UNIX.........................................6 2.1.5.2.1 Using a package manager..........................6 2.1.5.2.2 Manual installation.............................6 2.1.5.3 OSX..........................................7 2.1.5.3.1 Manual installation.............................7 2.1.6 Compiling a standalone program................................8 2.1.7 Generating an extension module................................8 2.1.7.1 Limitations.......................................9 2.1.7.2 Numpy integration...................................9 2.1.8 Distributing binaries...................................... 10 2.1.8.1 Windows........................................ 10 2.1.8.2 UNIX......................................... 10 2.1.9 Multiprocessing......................................... 10 2.1.10 Calling C/C++ code....................................... 11 2.1.10.1 Standard library...................................
    [Show full text]
  • Python Guide Documentation 0.0.1
    Python Guide Documentation 0.0.1 Kenneth Reitz 2015 11 07 Contents 1 3 1.1......................................................3 1.2 Python..................................................5 1.3 Mac OS XPython.............................................5 1.4 WindowsPython.............................................6 1.5 LinuxPython...............................................8 2 9 2.1......................................................9 2.2...................................................... 15 2.3...................................................... 24 2.4...................................................... 25 2.5...................................................... 27 2.6 Logging.................................................. 31 2.7...................................................... 34 2.8...................................................... 37 3 / 39 3.1...................................................... 39 3.2 Web................................................... 40 3.3 HTML.................................................. 47 3.4...................................................... 48 3.5 GUI.................................................... 49 3.6...................................................... 51 3.7...................................................... 52 3.8...................................................... 53 3.9...................................................... 58 3.10...................................................... 59 3.11...................................................... 62
    [Show full text]
  • Circuitpython Documentation Release 0.0.0
    CircuitPython Documentation Release 0.0.0 Damien P. George, Paul Sokolovsky, and contributors Jun 26, 2020 API and Usage 1 Adafruit CircuitPython 3 1.1 Status...................................................3 1.2 Supported Boards............................................3 1.2.1 Designed for CircuitPython...................................3 1.2.2 Other..............................................4 1.3 Download.................................................4 1.4 Documentation..............................................4 1.5 Contributing...............................................4 1.6 Differences from MicroPython......................................4 1.6.1 Behavior.............................................5 1.6.2 API...............................................5 1.6.3 Modules.............................................5 1.6.4 atmel-samd21 features.....................................5 1.7 Project Structure.............................................5 1.7.1 Core...............................................6 1.7.2 Ports...............................................6 1.8 Full Table of Contents..........................................7 1.8.1 Core Modules..........................................7 1.8.2 Supported Ports......................................... 47 1.8.3 Troubleshooting......................................... 56 1.8.4 Additional Adafruit Libraries and Drivers on GitHub..................... 57 1.8.5 Design Guide.......................................... 59 1.8.6 Architecture..........................................
    [Show full text]
  • Python Guide Documentation Publicación 0.0.1
    Python Guide Documentation Publicación 0.0.1 Kenneth Reitz 17 de May de 2018 Índice general 1. Empezando con Python 3 1.1. Eligiendo un Interprete Python (3 vs. 2).................................3 1.2. Instalando Python Correctamente....................................5 1.3. Instalando Python 3 en Mac OS X....................................6 1.4. Instalando Python 3 en Windows....................................8 1.5. Instalando Python 3 en Linux......................................9 1.6. Installing Python 2 on Mac OS X.................................... 10 1.7. Instalando Python 2 en Windows.................................... 12 1.8. Installing Python 2 on Linux....................................... 13 1.9. Pipenv & Ambientes Virtuales...................................... 14 1.10. Un nivel más bajo: virtualenv...................................... 17 2. Ambientes de Desarrollo de Python 21 2.1. Your Development Environment..................................... 21 2.2. Further Configuration of Pip and Virtualenv............................... 26 3. Escribiendo Buen Código Python 29 3.1. Estructurando tu Proyecto........................................ 29 3.2. Code Style................................................ 40 3.3. Reading Great Code........................................... 49 3.4. Documentation.............................................. 50 3.5. Testing Your Code............................................ 53 3.6. Logging.................................................. 57 3.7. Common Gotchas...........................................
    [Show full text]
  • Bfree: Enabling Battery-Free Sensor Prototyping with Python
    BFree: Enabling Battery-free Sensor Prototyping with Python VITO KORTBEEK, Delft University of Technology, The Netherlands ABU BAKAR, Northwestern University, USA STEFANY CRUZ, Northwestern University, USA KASIM SINAN YILDIRIM, University of Trento, Italy PRZEMYSŁAW PAWEŁCZAK, Delft University of Technology, The Netherlands JOSIAH HESTER, Northwestern University, USA Building and programming tiny battery-free energy harvesting embedded computer systems is hard for the average maker because of the lack of tools, hard to comprehend programming models, and frequent power failures. With the high ecologic cost of equipping the next trillion embedded devices with batteries, it is critical to equip the makers, hobbyists, and novice embedded systems programmers with easy-to-use tools supporting battery-free energy harvesting application development. This way, makers can create untethered embedded systems that are not plugged into the wall, the desktop, or even a battery, providing numerous new applications and allowing for a more sustainable vision of ubiquitous computing. In this paper, we present BFree, a system that makes it possible for makers, hobbyists, and novice embedded programmers to develop battery-free applications using Python programming language and widely available hobbyist maker platforms. BFree provides energy harvesting hardware and a power failure resilient version of Python, with durable libraries that enable common coding practice and off the shelf sensors. We develop demonstration applications, benchmark BFree against battery-powered
    [Show full text]