<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Gil on Shai Asher</title><link>https://slow-is-smooth.io/tags/gil/</link><description>Recent content in Gil on Shai Asher</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 16 Dec 2018 09:00:00 +0200</lastBuildDate><atom:link href="https://slow-is-smooth.io/tags/gil/index.xml" rel="self" type="application/rss+xml"/><item><title>One Lock for the Whole Interpreter</title><link>https://slow-is-smooth.io/blog/one-lock-for-the-whole-interpreter/</link><pubDate>Sun, 16 Dec 2018 09:00:00 +0200</pubDate><guid>https://slow-is-smooth.io/blog/one-lock-for-the-whole-interpreter/</guid><description>&lt;p&gt;On a virtual machine with four CPUs, a Python 3.7 program counted down from forty million in 0.43&#10;seconds with one thread. With four threads, each counting a quarter, it took 0.47. The machine had&#10;four times the hardware and the program got slightly slower, because only one thread at a time was&#10;ever allowed to run Python code. The same program hashing 64 KiB buffers with four threads ran 3.7&#10;times faster than with one. Hashing 1 KiB buffers, it ran at the same speed as one thread. Nothing&#10;in the Python code says which of those you&amp;rsquo;ll get.&lt;/p&gt;</description></item></channel></rss>