<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Jit on Shai Asher</title><link>https://slow-is-smooth.io/tags/jit/</link><description>Recent content in Jit on Shai Asher</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 29 May 2022 09:00:00 +0300</lastBuildDate><atom:link href="https://slow-is-smooth.io/tags/jit/index.xml" rel="self" type="application/rss+xml"/><item><title>Eleven Registers and a 512-Byte Stack</title><link>https://slow-is-smooth.io/blog/eleven-registers-and-a-512-byte-stack/</link><pubDate>Sun, 29 May 2022 09:00:00 +0300</pubDate><guid>https://slow-is-smooth.io/blog/eleven-registers-and-a-512-byte-stack/</guid><description>&lt;p&gt;Part 1&amp;rsquo;s counter reached the kernel as 216 bytes: 27 slots of eight bytes each, which clang made&#10;out of about thirty lines of C. The kernel kept 29 slots, 232 bytes, and handed 141 bytes of x86-64 machine&#10;code to the processor. Every one of those bytes has a reason, and this post finds it: what each field&#10;of each instruction means, why the program keeps its key&amp;rsquo;s address in one register and the number 1&#10;in another, how a call into the kernel ends up as a single machine instruction, and which line of the&#10;program each of the 141 bytes came from.&lt;/p&gt;</description></item><item><title>The Other Engines</title><link>https://slow-is-smooth.io/blog/the-other-engines/</link><pubDate>Sun, 26 Apr 2020 09:00:00 +0300</pubDate><guid>https://slow-is-smooth.io/blog/the-other-engines/</guid><description>&lt;p&gt;The same five-line function takes 0.34 seconds on CPython 3.8, 7 milliseconds on PyPy, 6 on Numba&#10;and 5 as typed Cython. Run it on PyPy with the JIT switched off and it takes 0.56 seconds, slower&#10;than CPython. Then hand a list of a million integers to a small C extension, once, and PyPy&amp;rsquo;s&#10;own built-in &lt;code&gt;sum()&lt;/code&gt; over that list goes from 1.9 milliseconds to 52 and stays there, because the C&#10;extension asked for something PyPy only has to fake: a C array of &lt;code&gt;PyObject*&lt;/code&gt; pointers, which is&#10;what a Python list is in CPython and not in PyPy.&lt;/p&gt;</description></item></channel></rss>