We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Executing scripts in a few milliseconds with MicroPython

Formal Metadata

Title
Executing scripts in a few milliseconds with MicroPython
Title of Series
Number of Parts
160
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Executing scripts in a few milliseconds with MicroPython EuroPython 2017 - Talk - 2017-07-14 - Arengo. Rimini, Italy Command execution time can become important in a number of applications. Commands executed in command-line completion need to execute in less then 100ms or users will perceive a delay. In Shell scripting one might want to execute commands repeatedly in a for loop and fast execution times makes this more feasible. Python is a very powerful language but has a much slower startup time compared to other interpreted languages like Perl, Lua and Bash. It can take up to 10 times longer to startup then some of these other languages. MicroPython was written as a lean implementation of Python 3 with a small subset of the standard library mainly intended to run on microcontrollers. But it happily runs on Unix systems with excellent startup performance, making it an ideal candidate for implementing certain time sensitive commands. This talk will: Explain when achieving fast execution times matters and when it doesn’t. Present two different approaches to measuring command execution time, one simple and the other more detailed and accurate. Compare execution times of a simple set of scripts that add two numbers in an number of different interpreted languages (micropython, python3, awk, perl, lua, bash). Present an example use case of MicroPython on Unix. Bash completion for pip install that completes the names of available packages live from a remote pypi mirror. Demonstrate the auto completion script with pip on a local pypi mirror