commit 15c03d3447bf4f7dcedce0808dbf53e16e23ac6d parent e72af5ea3180fe1d017fef23b73ae1ee7f43f985 Author: Andrew Laack <andrew@laack.co> Date: Sun, 11 Oct 2026 11:19:13 -0500 Continued working Diffstat:
52 files changed, 468 insertions(+), 158 deletions(-)
diff --git a/perf/vector/Makefile b/perf/vector/Makefile @@ -0,0 +1,7 @@ +build: + g++ raw_arr.cpp -o a.out + g++ vec.cpp -o b.out + +run: build + time bash -c "./a.out >> /dev/null" + time bash -c "./b.out >> /dev/null" diff --git a/perf/vector/a.out b/perf/vector/a.out Binary files differ. diff --git a/perf/vector/b.out b/perf/vector/b.out Binary files differ. diff --git a/perf/vector/raw_arr.cpp b/perf/vector/raw_arr.cpp @@ -0,0 +1,15 @@ +#include <iostream> +#include <stdlib.h> + +int main() { + int sz = 10000000; + int* ar = (int*)malloc(sizeof(int) * sz); + + for(int i = 0; i < sz; ++i) { + ar[i] = rand(); + } + + for(size_t i = 0; i < 80000000; ++i) { + std::cout << ar[rand() % sz] << std::endl; + } +} diff --git a/perf/vector/vec.cpp b/perf/vector/vec.cpp @@ -0,0 +1,16 @@ +#include <iostream> +#include <vector> +#include <stdlib.h> + +int main() { + int sz = 10000000; + std::vector<int> ar (sz); + + for(int i = 0; i < sz; ++i) { + ar[i] = rand(); + } + + for(size_t i = 0; i < 80000000; ++i) { + std::cout << ar[rand() % sz] << std::endl; + } +} diff --git a/posts/site_wip/a-brief-history-of-version-control.html b/posts/site_wip/a-brief-history-of-version-control.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>a-brief-history-of-version-control</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/a-gemini-browser.html b/posts/site_wip/a-gemini-browser.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>a-gemini-browser</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/advertising.html b/posts/site_wip/advertising.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>advertising</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/ai-and-meta-work.html b/posts/site_wip/ai-and-meta-work.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>ai-and-meta-work</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/ai-makes-programming-boring-for-me.html b/posts/site_wip/ai-makes-programming-boring-for-me.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>ai-makes-programming-boring-for-me</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/all-roads-lead-to-gemtext.html b/posts/site_wip/all-roads-lead-to-gemtext.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>all-roads-lead-to-gemtext</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/are-llms-useful.html b/posts/site_wip/are-llms-useful.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>are-llms-useful</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/array-buffer-fifo.html b/posts/site_wip/array-buffer-fifo.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta charset="utf-8" /> + <meta name="generator" content="pandoc 3.11" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> + <title>array-buffer-fifo</title> + <style> + /* Default styles provided by pandoc. + ** See https://pandoc.org/MANUAL.html#variables-for-html for config info. + */ + span.smallcaps{font-variant: small-caps;} + div.columns{display: flex; gap: 1.5em;} + div.column{flex: auto;} + @media screen { + div.columns{gap: min(4vw, 1.5em);} + div.column{overflow-x: auto;} + } + div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} + /* The extra [class] is a hack that increases specificity enough to + override a similar rule in reveal.js */ + ul.task-list[class]{list-style: none;} + ul.task-list li input[type="checkbox"] { + font-size: inherit; + width: 0.8em; + margin: 0 0.8em 0.2em -1.6em; + vertical-align: middle; + } + </style> + <link rel="stylesheet" href="style.css" /> +</head> +<body> +<h1 id="array-buffer-fifo">Array Buffer FIFO</h1> +<p>Compare this with the deque approach.</p> +<p>Discuss comp. complexity vs work optimization and such.</p> +<p>woah; this is like a lot faster.</p> +</body> +</html> diff --git a/posts/site_wip/basic-software-profiling-cpu-usage.html b/posts/site_wip/basic-software-profiling-cpu-usage.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>basic-software-profiling-cpu-usage</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} /* CSS for syntax highlighting */ html { -webkit-text-size-adjust: 100%; } pre > code.sourceCode { white-space: pre; position: relative; } @@ -99,19 +98,20 @@ <link rel="stylesheet" href="style.css" /> </head> <body> +<p>TODOS: - since we support http(s) we mustn’t hardcode file paths. - review the ending stuff - formatting for all the preformatted sections</p> <h1 id="basic-software-profiling-cpu-usage">Basic Software Profiling: CPU Usage</h1> -<p>This blog post is for former me. The me who was doing ML research, writing C++ code to make my software run faster, but didn’t have an understanding of performance profiling. In retrospect, I wasted a lot of time, and CPU cycles, because I didn’t know these tools existed. I spent lots of money on compute, which was only necessary because I didn’t understand what I could do to make my software run faster.</p> -<p>This post will not go in depth on how to speed up software, but it will discuss the process of identifying what parts of a program are taking the most time. I’ll be focusing on compiled CPU-bound programs in this post, but many of these ideas generalize to interpreted programs that have other bottlenecks.</p> +<p>Collectively, we waste trillions of CPU cycles every day because software isn’t profiled frequently. I believe this is an educational problem.</p> +<p>This post will explain how you can find the parts of a program hogging the most CPU time. The post will focus on compiled programs, but the core ideas can be applied to interpreted programs.</p> <h2 id="tools">Tools</h2> -<p><a href="https://en.wikipedia.org/wiki/Perf_%28Linux%29">Perf</a> is the DevTools of Linux. Only one of the three most popular operating systems (Linux, OpenBSD, FreeBSD) supports perf, but there are sufficient analogs on FreeBSD, and if you’re on OpenBSD good luck.</p> -<p>You might also want a visualization tool. I’ll be showing <a href="https://github.com/brendangregg/FlameGraph">flamegraph</a>. Normally I just use perf because it is very powerful, but having pleasing visuals is useful for demonstrations (newer versions of <code>perf</code> can generate flamegraphs directly, but I prefer Brendan’s implementation).</p> -<h2 id="reading-a-flamegraph">Reading a flamegraph</h2> -<p>Let’s start with something easy, how do you read a flamegraph? Take a look at the following flamegraph and, without my help, try to understand what’s being shown:</p> +<p><a href="https://en.wikipedia.org/wiki/Perf_%28Linux%29">Perf</a> is a suite of tools for program profiling on Linux. We will mainly use it to collect aggregate performance metrics and call stack information. Analogous tools exist for other Free operating systems, and dedicated tools exist for many interpreted languages to collect call stack information.</p> +<p><a href="https://github.com/brendangregg/FlameGraph">Flamegraph</a> is a suite of tools for generating flamegraphs, a type of graph designed for the visualization of performance data.</p> +<h2 id="reading-a-flamegraph">Reading a Flamegraph</h2> +<p>Take a look at the flamegraph below and try to understand the performance characteristics of the program:</p> <object data="https://blog.laack.co/images/ex1-fg.svg" type="image/svg+xml" width="100%"> </object> <details> <summary> -Source code that generated this flamegraph +Source code for the program that generated this flamegraph </summary> <div class="sourceCode" id="cb1"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="dt">uint32_t</span> square<span class="op">(</span><span class="dt">uint32_t</span> input<span class="op">)</span> <span class="op">{</span></span> <span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> input <span class="op">*</span> input<span class="op">;</span></span> @@ -151,18 +151,17 @@ Source code that generated this flamegraph <span id="cb1-36"><a href="#cb1-36" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span> <span id="cb1-37"><a href="#cb1-37" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> </details> -<p>The amount of time spent with the <code>main</code> function on the stack is represented by the width of its bar.</p> -<p>Notice how there are multiple bars that say <code>square</code>. This is because we execute <code>square</code> at different stack depths, and the width of each bar is dictated by the amount of time we spent with <code>square</code> on the call stack at a given stack depth.</p> +<p>The amount of time spent with the <code>main</code> function on the call stack is represented by the width of its bar.</p> +<p>Notice how there are multiple bars that say <code>square</code>. This is because we execute <code>square</code> at different call stack depths, and the width of each bar is dictated by the amount of time we spent with <code>square</code> on the call stack at a given stack depth.</p> <p>Given how the widths are calculated, we can deduce the top-down width of a bar is how much time the program spent executing a specific function. In the case of <code>squareHelper</code> and <code>square</code>, we see we spent more time executing <code>squareHelper</code> than <code>square</code>, evidenced by the fact that from a top-down view, <code>squareHelper</code> is wider.</p> -<p>The astute among you might’ve noticed that <code>square</code> and <code>squareHelper</code> appear to sometimes be executed outside of the main loop. This is due to how stack depth is calculated, and that’s a bit more technical than I’ll be able to discuss here.</p> +<p>The astute among you might’ve noticed <code>square</code> and <code>squareHelper</code> seem to have been executed a few times outside of the main loop. This is due to how <code>perf</code> calculates the stack depth. The specifics of this are more in the weeds than we’ll discuss here, but it shouldn’t meaningfully impact the high level information that can be obtained from a flamegraph.</p> <h2 id="perf">Perf</h2> -<p>I’ve been a little loose with my words thus far in describing flamegraphs. The command I’ve been using with perf to generate the data for flamegraphs isn’t tracking the amount of time spent with a function on the stack at a given depth, we are instead tracking the number of on-CPU samples taken with the function on the top of the call stack. This distinction is important because things like blocking I/O will not be reflected in our timings. Additionally, since perf is interrupt based, it may miss some data, but it gives a good enough approximation of CPU utilization.</p> -<pre><code>perf record -g ./ex1</code></pre> -<p>This is the command I ran to generate the data for the flamegraph. The <code>record</code> command is used to record events that will be written to the <code>perf.data</code> file. By default, <code>perf record</code> will sample at 1000Hz. The final option, <code>-g</code>, is used to specify we are interested in having the call stack included in our data.</p> -<p>If you want to generate a flamegraph right away, you can run the following command:</p> -<pre><code>perf script report flamegraph</code></pre> -<p>This isn’t how the flamegraph above was generated because I prefer Brendan’s FlameGraph program, but both are fairly similar, and in a pinch, <code>perf script report flamegraph</code> will work. A command I use more often to view performance is:</p> -<pre><code>perf report -g</code></pre> +<p>I’ve been loose with my words in terms of the specific data being displayed by the flamegraph. The command I used to generate the data for the flamegraph doesn’t track the amount of time spent with a function on the stack at a given depth, we are instead tracking the number of on-CPU samples taken with the function on the top of the call stack. This distinction is important because things like blocking I/O will not be reflected in our timings.</p> +<p>This is the command I ran to generate the data:</p> +<div class="sourceCode" id="cb2"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">perf</span> record <span class="at">-g</span> ./ex1</span></code></pre></div> +<p>The <code>record</code> command is used to run a command and record its performance profile. These are written to the <code>perf.data</code> file. By default, <code>perf record</code> will sample at 1000Hz while the program is on-CPU. The final option, <code>-g</code>, is used to specify we are interested in having the call stack included in our data.</p> +<p>To view aggregate information about the data in the <code>perf.data</code> file we can run:</p> +<div class="sourceCode" id="cb3"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">perf</span> report <span class="at">-g</span></span></code></pre></div> <pre><code>+ 100.00% 0.00% ex1 ex1 [.] _start + 100.00% 0.00% ex1 libc.so.6 [.] __libc_start_main + 100.00% 0.00% ex1 libc.so.6 [.] call_init (inlined) @@ -172,8 +171,8 @@ Source code that generated this flamegraph + 29.99% 19.90% ex1 ex1 [.] square(unsigned int) + 21.61% 20.69% ex1 ex1 [.] factorial(unsigned int) ...</code></pre> -<p>or if I’m curious to see function calling information:</p> -<pre><code>perf report -g --stdio</code></pre> +<p>If you are interested in information about which functions are calling each other, and the resulting on-CPU times therein, you can run this command:</p> +<div class="sourceCode" id="cb5"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">perf</span> report <span class="at">-g</span> <span class="at">--stdio</span></span></code></pre></div> <pre><code>... |--88.87%--main | | @@ -191,8 +190,8 @@ Source code that generated this flamegraph | --1.13%--factorial(unsigned int) ...</code></pre> -<p>In many cases, I find the <code>--stdio</code> command a bit difficult to read because the report can get exceptionally wide for any non-trivial program (there are additional CLI options that can help with this), and such navigation in the terminal is difficult.</p> -<p>The final thing I wanted to mention is if you just want high level information about your program’s performance, this is a useful command:</p> +<p>In many cases, I find the <code>--stdio</code> command a bit difficult to read because the report can get wide for non-trivial programs (there are additional CLI options that can help with this), and horizontal navigation in the terminal is unergonomic.</p> +<p>The final command worth mentioning is:</p> <pre><code>perf stat ./ex1</code></pre> <pre><code> Performance counter stats for './ex1': @@ -213,25 +212,26 @@ Source code that generated this flamegraph 32.234190000 seconds user 0.002939000 seconds sys</code></pre> -<p>This is the command I run most frequently when validating optimizations where the optimization is targeting a portion of the codebase with an outsized footprint. If the program is more uniformly expensive, <code>perf stat</code> is likely less useful than a full report / flamegraph.</p> -<h2 id="what-to-optimize">What to optimize</h2> -<p>Start with the functions that are costing the most CPU time. Often a very small number of functions take up the majority of the computation, and these are the ones worth optimizing. As it relates to optimization in this context, I don’t expect most people to be hand coding assembly, and if you are, you already know all of this anyways. This is for the people just building normal software, consider what’s costly and ask yourself two questions:</p> +<p>Which provides high level information about the program’s entire execution.</p> +<p>This is the command I run most frequently when validating optimizations when the optimization is aimed at improving the performance of a function that contributes a lot to the total program runtime. If the program is more uniformly expensive across many functions, <code>perf stat</code> is less useful than a full report / flamegraph.</p> +<h2 id="what-to-optimize">What to Optimize</h2> +<p>Start with functions using lots of CPU time that you wouldn’t expect to. Often a small number of functions do the majority of computation, and these are the ones worth optimizing in the average case. To make these functions run faster, you should consider the following:</p> <ol type="1"> -<li>Would it be possible to call this function less often</li> -<li>Would it be possible to make each call of this function perform less work</li> +<li>Can we call this function less often</li> +<li>Can each call perform less work via algorithmic improvements</li> </ol> -<p>Work is key for most optimization; cache friendliness is important, but what I really want from software I use is for it to not leave tons of performance on the table by using bad algorithms, performing unexpected / unnecessary copies, or calling functions (like draw functions) when they don’t have to.</p> -<h2 id="amfora">Amfora</h2> -<p>Something useful to understand when profiling is the ideal case. Without a conception of how long (roughly) reading a file should take, transferring data, or drawing text, it’s hard to understand if performance is to be expected or abnormal. This is very contextual, so I can’t answer every question that’s relevant for this, but something I’ve found useful is comparing what I have with something that’s similar in ways I’d anticipate that result in similar performance to see where each implementation is spending a disproportionate amount of cycles.</p> -<p>To this end, when I was working on my Gemini protocol browser I wanted to compare it against a well known browser. Amfora states in the readme that it “aims to be the best looking Gemini client with the most features”, and while I absotlutely detest the idea that more features means slower in all cases, they do have some features that make it slower*. Specifically, they have syntax highlighting and per character coloring, neither of which my browser has, instead opting for a simpler line based coloring approach which I believe still results in nice looking gemtext because it’s all line based at the end of the day.</p> -<p>(* They could’ve done coloring as a second pass perhaps to improve perceived performance, but I’d imagine that’d be more complex, and it would increase the time to having the finalized text displayed)</p> -<p>I decided the first benchmark I was going to perform was a comparison between their performances when opening large files on my filesystem. This was quickly stopped when I realized amfora has a max file size limit of 2097152 bytes or ~2MB. That’s curious, but alright then. Let’s just make a file that’s bigger than 1MB.</p> -<p>This is a first pass at a direct comparison so I’m not going to make it the max size, and I’m not going to use a representative text, just a bunch of numbers.</p> -<div class="sourceCode" id="cb10"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="cf">with</span> <span class="bu">open</span>(<span class="st">"lf.txt"</span>, <span class="st">"w"</span>) <span class="im">as</span> f:</span> -<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> i <span class="kw">in</span> <span class="bu">range</span>(<span class="dv">0</span>,<span class="dv">200000</span>):</span> -<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a> f.write(<span class="bu">str</span>(i) <span class="op">+</span> <span class="st">"</span><span class="ch">\n</span><span class="st">"</span>)</span></code></pre></div> -<p>That should be good enough, the resulting file is ~1.3MB in size.</p> -<p>I then ran following command:</p> +<p>Both of these questions are about decreasing work, not making the work faster. Making work faster can be complex, and it’s often easier to improve performance by decreasing wasted work and algorithmic improvements.</p> +<h2 id="case-study">Case Study</h2> +<h3 id="amfora">Amfora</h3> +<p>Amfora is a fancy terminal-based Gemini protocol browser with syntax highlighting. When I start profiling software in a well-trodden domain, I find it useful to use an oracle to understand what’s possible. An oracle in this context is a program that performs comparable tasks with sensible performance.</p> +<p>For Amfora I chose Foreseen (my Gemini protocol browser) as the oracle as it has adequate performance, and performs a sensible subset of the tasks performed by Amfora, notably without the inclusion of syntax highlighting or character addressable coloring.</p> +<p>I normally start by testing out what I think will be the worst cases. I’ve found worst cases are often amplifications of average cases, so by improving worst case performance you can improve average case performance as well.</p> +<p>Let’s evaluating the worst case for just rendering. We’ll load a large text file from disk into both browsers, ending execution once text is drawn. I used this code to generate the file:</p> +<div class="sourceCode" id="cb9"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="cf">with</span> <span class="bu">open</span>(<span class="st">"lf.txt"</span>, <span class="st">"w"</span>) <span class="im">as</span> f:</span> +<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> i <span class="kw">in</span> <span class="bu">range</span>(<span class="dv">0</span>,<span class="dv">200000</span>):</span> +<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a> f.write(<span class="bu">str</span>(i) <span class="op">+</span> <span class="st">"</span><span class="ch">\n</span><span class="st">"</span>)</span></code></pre></div> +<p>The resulting file is ~1.3MB in size, less than the ~2MB max file size for Amfora, and the 5MB truncation size for foreseen.</p> +<p>I then ran both programs killing each program with Ctrl-C at first draw of the text from the file:</p> <pre><code>perf stat amfora lf.txt Performance counter stats for 'amfora lf.txt': @@ -254,7 +254,6 @@ Performance counter stats for 'amfora lf.txt': 0.272938000 seconds user 0.021266000 seconds sys </code></pre> -<p>This is quite unscientific because I simply Ctrl-C’d out once the first characters had rendered. Here’s the same for foreseen:</p> <pre><code>perf stat foreseen lf.txt Performance counter stats for 'foreseen lf.txt': @@ -276,8 +275,29 @@ Performance counter stats for 'amfora lf.txt': 0.066861000 seconds user 0.021186000 seconds sys</code></pre> -<p>Of these metrics, the most comparable one is CPU cycles because they aren’t spinning during the time it took me to react to the text having been rendered, but even so, this isn’t a very good benchmark, and it’s not something I’d post about.</p> -<p>Since Amfora can highlight code, let’s see how the performance comparse if we just add our python code block to the top of that file, and rename it to lf.gmi:</p> +<p>This is very unscientific, but that’s how I like to start profiling. Given how unscientific this methodology is, we can’t conclude anything from this as the timings are within margin of error. It might be worth looking into this further in the future if nothing obvious is found.</p> +<p>Since Amfora can highlight code, let’s see how the performance changes when we add our python code block from above to the top of the file and rename the file to lf.gmi:</p> +<pre><code>perf stat foreseen lf.gmi + + Performance counter stats for 'foreseen lf.gmi': + + 0 context-switches:u # 0.0 cs/sec cs_per_second + 0 cpu-migrations:u # 0.0 migrations/sec migrations_per_second + 6,551 page-faults:u # 90396.7 faults/sec page_faults_per_second + 72.47 msec task-clock:u # nan CPUs CPUs_utilized + 154,134 branch-misses:u # 0.1 % branch_miss_rate (88.98%) + 166,258,529 branches:u # 2294.2 M/sec branch_frequency (88.99%) + 232,523,911 cpu-cycles:u # 3.2 GHz cycles_frequency (88.96%) + 705,288,446 instructions:u # 3.0 instructions insn_per_cycle (88.93%) + TopdownL1 # 7.6 % tma_backend_bound + # 23.2 % tma_bad_speculation (88.96%) + # 18.8 % tma_frontend_bound (77.41%) + # 50.4 % tma_retiring (88.45%) + + 0.381682961 seconds time elapsed + + 0.058132000 seconds user + 0.015949000 seconds sys</code></pre> <pre><code>perf stat amfora lf.gmi Performance counter stats for 'amfora lf.gmi': @@ -286,20 +306,20 @@ Performance counter stats for 'amfora lf.txt': 0 cpu-migrations:u # 0.0 migrations/sec migrations_per_second 900,174 page-faults:u # 12090.4 faults/sec page_faults_per_second 74,453.35 msec task-clock:u # nan CPUs CPUs_utilized - 229,042,926 branch-misses:u # 0.4 % branch_miss_rate (88.94%) - 62,713,218,442 branches:u # 842.3 M/sec branch_frequency (88.85%) - 153,193,058,619 cpu-cycles:u # 2.1 GHz cycles_frequency (88.97%) + 229,042,926 branch-misses:u # 0.4 % branch_miss_rate (88.94%) + 62,713,218,442 branches:u # 842.3 M/sec branch_frequency (88.85%) + 153,193,058,619 cpu-cycles:u # 2.1 GHz cycles_frequency (88.97%) 306,159,421,078 instructions:u # 2.0 instructions insn_per_cycle (88.90%) TopdownL1 # 0.6 % tma_backend_bound - # 97.8 % tma_bad_speculation (88.83%) - # -0.1 % tma_frontend_bound (77.86%) - # 1.7 % tma_retiring (88.91%) + # 97.8 % tma_bad_speculation (88.83%) + # -0.1 % tma_frontend_bound (77.86%) + # 1.7 % tma_retiring (88.91%) 28.983517177 seconds time elapsed 63.894262000 seconds user 8.207151000 seconds sys</code></pre> -<p>Woah, that’s a lot slower. With foreseen there shouldn’t be any difference because each line is treated ~ the same, so something’s up here. Let’s look at a flamegraph for this.</p> +<p>That’s a lot slower for Amfora. Let’s look at a flamegraph for this.</p> <object data="https://blog.laack.co/images/amfora-before.svg" type="image/svg+xml" width="100%"> </object> <p>So 68.34% samples occurred while executing the GC, that’s a bit surprising, even given how awful garbage collectors are. We also see that 25.47% of the time, most of the remaining time, is spent in the RenderGemini function. Of this, most of it is spent on concatstring3, a function under the hood that’s used to concatenate strings.</p> @@ -347,12 +367,11 @@ buf += strings.TrimSuffix(lines[i], "\r") + "\r\n"</code></p </object> <p>Looking again at the flamegraph, we see the RenderGemini function is now mostly performing word wrapping, and the GC is only utilizing the CPU during 16.48% of our samples, much better.</p> <p>We can go deeper into this if we’d like, but there are now 3 ~equally costly groupings, and as performance becomes more diffuse, optimizations will generally have a smaller amount of impact on perf, so we can leave this where it is.</p> -<h2 id="refutations">Refutations</h2> -<p>I think everything above paints a picture that you don’t have to put in that much effort to, in many cases, make things a lot better, and you don’t have to be that well versed in optimization either.</p> -<p>I often hear arguments about how we should just let other people make software and we’ll just use it and be happy because they’re smarter / better than us at it, this is often the case with libraries, and I so vehemently disagree with this idea. Amfora is a piece of software with 1.4K Github stars, that’s existed for > 6 years with 54 contributors; it’s not tiny, and yet a glaring issue took this long to find and solve.</p> -<p>While I do think there is blame in this situation, I don’t think there should be any shame in writing bad software, but it’s all of our jobs to make our software a little less bad over time, hopefully you can do the same, and help others with that too.</p> <h2 id="whats-next">What’s Next</h2> -<p>Consider learning memory profiling next. I didn’t directly discuss the topic because 1) it’s more complex and 2) memory related performance issues often manifest, like we saw in the go example, as CPU performance issues too. I also didn’t discuss anything related to instrumented profiling; everything I’ve shown with perf can be done without changing any code. When you can change the code, you have the ability to get more granular than just getting metrics on the basis of functions. Despite the upsides of instrumented profiling, I rarely do it because it often takes more time. The main context where I do it is to get shareable information with others, in a working context, and for intra-function profiling.</p> -<p>Memory stuff is also more complex across languages, where they do weird stuff like go not using malloc.</p> +<p>This post only focused on on-CPU time. There are two additional metrics worth profiling I’ll discuss in the future:</p> +<ol type="1"> +<li>Off CPU profiling</li> +<li>Memory profiling</li> +</ol> </body> </html> diff --git a/posts/site_wip/boundary-between-vector-and-hashmap.html b/posts/site_wip/boundary-between-vector-and-hashmap.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta charset="utf-8" /> + <meta name="generator" content="pandoc 3.11" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> + <title>boundary-between-vector-and-hashmap</title> + <style> + /* Default styles provided by pandoc. + ** See https://pandoc.org/MANUAL.html#variables-for-html for config info. + */ + span.smallcaps{font-variant: small-caps;} + div.columns{display: flex; gap: 1.5em;} + div.column{flex: auto;} + @media screen { + div.columns{gap: min(4vw, 1.5em);} + div.column{overflow-x: auto;} + } + div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} + /* The extra [class] is a hack that increases specificity enough to + override a similar rule in reveal.js */ + ul.task-list[class]{list-style: none;} + ul.task-list li input[type="checkbox"] { + font-size: inherit; + width: 0.8em; + margin: 0 0.8em 0.2em -1.6em; + vertical-align: middle; + } + </style> + <link rel="stylesheet" href="style.css" /> +</head> +<body> +<h1 id="boundary-between-hashmap-and-vector-c">Boundary Between Hashmap and Vector (C++)</h1> +<p>At what size is it faster to use a hashmap than a vector?</p> +<p>THere’s a subquestion here of access patterns. That is, if I am inserting a lot, reading a lot, etc., when should I do each?</p> +</body> +</html> diff --git a/posts/site_wip/complexity-facilitates-opression.html b/posts/site_wip/complexity-facilitates-opression.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>complexity-facilitates-opression</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/constrained-software-revolution.html b/posts/site_wip/constrained-software-revolution.html @@ -0,0 +1,137 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta charset="utf-8" /> + <meta name="generator" content="pandoc 3.11" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> + <title>constrained-software-revolution</title> + <style> + /* Default styles provided by pandoc. + ** See https://pandoc.org/MANUAL.html#variables-for-html for config info. + */ + span.smallcaps{font-variant: small-caps;} + div.columns{display: flex; gap: 1.5em;} + div.column{flex: auto;} + @media screen { + div.columns{gap: min(4vw, 1.5em);} + div.column{overflow-x: auto;} + } + div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} + /* The extra [class] is a hack that increases specificity enough to + override a similar rule in reveal.js */ + ul.task-list[class]{list-style: none;} + ul.task-list li input[type="checkbox"] { + font-size: inherit; + width: 0.8em; + margin: 0 0.8em 0.2em -1.6em; + vertical-align: middle; + } + </style> + <link rel="stylesheet" href="style.css" /> +</head> +<body> +<h1 id="constrained-software-revolution">Constrained Software Revolution</h1> +<p><a href="constrained.net">constrained.net</a></p> +<hr /> +<p>General flow:</p> +<ol type="1"> +<li>explain the issues today +<ul> +<li>slow software</li> +<li>buggy software</li> +<li>abusive software</li> +</ul></li> +<li>explain the reasons</li> +<li>introduce constrained software +<ul> +<li>definition</li> +<li>examples</li> +</ul></li> +<li>why not just xyz +<ul> +<li>suckless +<ul> +<li>too focused on advanced usage</li> +</ul></li> +<li>minimalist +<ul> +<li>minimalist is synonymous as long as it’s extended to computational minimalism. While less features / complexity is good, a python program with few features is still often not constrained</li> +</ul></li> +</ul></li> +<li>moving forwards, how to contribute, stuff like that +<ul> +<li>is foreseen constrained software +<ul> +<li>it works from a termainal so accessible</li> +<li>it works on low end devices</li> +<li>I think distribution wise it’s limited, but that’s a nice to have not a requirement</li> +</ul></li> +</ul></li> +</ol> +<hr /> +<p>Software has been atrophying for years. Every release of Firefox is more bloated and complex than the last, every release of Chromium the same. New websites from today are slower than they were last month, year, and decade.</p> +<p>For all of the claims about caring about inclusion, people seem to not notice how exclusive they are being. When you make software that’s slow, buggy, and complicated you’re excluding people. People who have slower computers, who use different operating systems, who have disabilities, and who want to make their own standards-compliant software. Slow down and consider this: Is you’re click-jacking website harming or helping people? Is adding that ill considered feature to Firefox that only slows down startup time by 5ms (on your computer) really worth adding? Every choice in this process leads to the atrophying of software, and leads to the here and now.</p> +<p>In some ways, software is better now than it’s ever been before. My text editor, vim, is marginally better than it was 20 years ago, and if it wasn’t, I’d just build that version instead, but when people treat their software like milk that spoils quickly, we don’t have the luxury to go back in time and use what we had. Most people, misguidedly, interact with computing systems via the internet, a transient, spoiling, slow, inaccessible hellscape.</p> +<p>It doesn’t have to be like this.</p> +<h2 id="constrained-software">Constrained Software</h2> +<p>Definition:</p> +<ol type="1"> +<li>Performs a constrained set of functions</li> +<li>Is usable on constrained systems</li> +</ol> +<p>This is the entire definition. Let’s break these down.</p> +<blockquote> +<p>Performs a constrained set of functions.</p> +</blockquote> +<p>A cohesive functions. A few things that come to mind:</p> +<ol type="1"> +<li>Dillo</li> +<li>Mpv</li> +<li>Lagrange</li> +</ol> +<p>Dillo is designed to browse the web, with plugins to browse alternative protocols too. This is cohesive. It is for browsing, and the additional features aid in this.</p> +<p>Mpv is a useful tool for displaying many video formats, coming from many sources. This is not a small task as there are many video file formats, and it supports video streaming from sites as well.</p> +<p>This small set of functions must be cohesive, it wouldn’t make sense for your text editor to have an rss feed built into it, but conversely tools that are too small in scope become tedius to use directly.</p> +<blockquote> +<p>Respects the user</p> +</blockquote> +<p>To respect the user, software must be accessible. This means it works across a variety of system configurations and is usable by people with many types of impairments. It must also not do things they don’t want, like spy on them.</p> +<blockquote> +<p>Simple</p> +</blockquote> +<p>Complicated software is what has led to the situation we have now. Complicated software entrenched a duopoly of browser engines,</p> +<h2 id="so-suckless">So Suckless?</h2> +<p>Not quite.</p> +<p>From their website:</p> +<blockquote> +<p>Our project focuses on advanced and experienced computer users</p> +</blockquote> +<p>This is one distinction. There is an underserved niche of software for experienced users, but I don’t believe constrained software should necessarily target this niche. Grandmas should be able to use constrained software; it’s built to be intuitive and simple.</p> +<p>Consider Dillo. There are advanced features, facilitated by its plugins system, but the base browser is exceptionally approachable. I’d argue it’s more approachable than Chromium. I won’t claim it would be preferred by many users in its present state, but slight improvements to the usage experience to keep up with modern standards (some stuff with settings and first pass rendering missing css sometimes) would certainly make it as usable or more usable.</p> +<p>The problem right now is most sites people patronize don’t work without J<strong><em>S</em></strong>**. I’ve accepted sites like that aren’t made for me, but it requires widespread disdain to make it known people are sick and tired of this.</p> +<hr /> +<ul> +<li>constrained software +<ul> +<li>this is a nice name, but it’s not a unique enough word</li> +<li>if I search suckless, I find suckless.</li> +</ul></li> +<li>unflashy software</li> +<li>workhorse software</li> +<li>scopeful software +<ul> +<li>software with a sensible scope</li> +</ul></li> +<li>tractable software +<ul> +<li>software that is doable for an individual</li> +</ul></li> +<li>practical software</li> +<li>bloatless software +<ul> +<li>software without the bloat</li> +</ul></li> +<li>respectful software</li> +</ul> +</body> +</html> diff --git a/posts/site_wip/default-cracked.html b/posts/site_wip/default-cracked.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>default-cracked</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/dissatisfaction.html b/posts/site_wip/dissatisfaction.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>dissatisfaction</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/do-tools-actually-matter.html b/posts/site_wip/do-tools-actually-matter.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>do-tools-actually-matter</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/encrypted-messaging.html b/posts/site_wip/encrypted-messaging.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>encrypted-messaging</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/greyscale-shader.html b/posts/site_wip/greyscale-shader.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>greyscale-shader</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/how-i-learn.html b/posts/site_wip/how-i-learn.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>how-i-learn</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/how-to-choose-software.html b/posts/site_wip/how-to-choose-software.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>how-to-choose-software</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/ideal-note-taking.html b/posts/site_wip/ideal-note-taking.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>ideal-note-taking</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/interesting-tests-ive-written.html b/posts/site_wip/interesting-tests-ive-written.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>interesting-tests-ive-written</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/just-because-youre-right-doesnt-mean-it-matters.html b/posts/site_wip/just-because-youre-right-doesnt-mean-it-matters.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>just-because-youre-right-doesnt-mean-it-matters</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/lets-make-all-software-faster.html b/posts/site_wip/lets-make-all-software-faster.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>lets-make-all-software-faster</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/my-definition-of-good-software.html b/posts/site_wip/my-definition-of-good-software.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>my-definition-of-good-software</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/my-favorite-piece-of-software.html b/posts/site_wip/my-favorite-piece-of-software.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>my-favorite-piece-of-software</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/my-ideal-vcs.html b/posts/site_wip/my-ideal-vcs.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>my-ideal-vcs</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/rent-seeking-software.html b/posts/site_wip/rent-seeking-software.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>rent-seeking-software</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/should-i-be-using-llms-for-learning.html b/posts/site_wip/should-i-be-using-llms-for-learning.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>should-i-be-using-llms-for-learning</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/so-fast-its-confusing.html b/posts/site_wip/so-fast-its-confusing.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta charset="utf-8" /> + <meta name="generator" content="pandoc 3.11" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> + <title>so-fast-its-confusing</title> + <style> + /* Default styles provided by pandoc. + ** See https://pandoc.org/MANUAL.html#variables-for-html for config info. + */ + span.smallcaps{font-variant: small-caps;} + div.columns{display: flex; gap: 1.5em;} + div.column{flex: auto;} + @media screen { + div.columns{gap: min(4vw, 1.5em);} + div.column{overflow-x: auto;} + } + div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} + /* The extra [class] is a hack that increases specificity enough to + override a similar rule in reveal.js */ + ul.task-list[class]{list-style: none;} + ul.task-list li input[type="checkbox"] { + font-size: inherit; + width: 0.8em; + margin: 0 0.8em 0.2em -1.6em; + vertical-align: middle; + } + </style> + <link rel="stylesheet" href="style.css" /> +</head> +<body> +<h1 id="so-fast-its-confusing">So Fast It’s Confusing</h1> +<p>Dillo is so fast it’s confusing.</p> +<p>(modern hardware)</p> +<p>Benchmarking:</p> +<p>time to first paint:</p> +<p>(frames at 60 fps)</p> +<p>librewolf:</p> +<p>10 frames 10 frames 10 frames 9 frames 8 frames 10 frames 9 frames</p> +<p>chromium:</p> +<p>23 frames 23 frames 23 frames 23 frames</p> +<p>dillo:</p> +<p>6 frames 7 frames 6 frames</p> +<p>The delta between fast and slow is somewhere around 5-7 frames for me (<span class="citation" data-cites="60">@60</span> fps)</p> +</body> +</html> diff --git a/posts/site_wip/the-best-privacy-browser.html b/posts/site_wip/the-best-privacy-browser.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>the-best-privacy-browser</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/the-big-three-privacy-search-engines.html b/posts/site_wip/the-big-three-privacy-search-engines.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>the-big-three-privacy-search-engines</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/the-case-against-verification.html b/posts/site_wip/the-case-against-verification.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>the-case-against-verification</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/the-legality-of-summarization.html b/posts/site_wip/the-legality-of-summarization.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>the-legality-of-summarization</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/tracking-lifts.html b/posts/site_wip/tracking-lifts.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>tracking-lifts</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/vim-hax.html b/posts/site_wip/vim-hax.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta charset="utf-8" /> + <meta name="generator" content="pandoc 3.11" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> + <title>vim-hax</title> + <style> + /* Default styles provided by pandoc. + ** See https://pandoc.org/MANUAL.html#variables-for-html for config info. + */ + span.smallcaps{font-variant: small-caps;} + div.columns{display: flex; gap: 1.5em;} + div.column{flex: auto;} + @media screen { + div.columns{gap: min(4vw, 1.5em);} + div.column{overflow-x: auto;} + } + div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} + /* The extra [class] is a hack that increases specificity enough to + override a similar rule in reveal.js */ + ul.task-list[class]{list-style: none;} + ul.task-list li input[type="checkbox"] { + font-size: inherit; + width: 0.8em; + margin: 0 0.8em 0.2em -1.6em; + vertical-align: middle; + } + </style> + <link rel="stylesheet" href="style.css" /> +</head> +<body> +<h1 id="vim-hax">Vim Hax</h1> +<ul> +<li>persistent undo</li> +</ul> +</body> +</html> diff --git a/posts/site_wip/what-i-want-from-a-vcs.html b/posts/site_wip/what-i-want-from-a-vcs.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>what-i-want-from-a-vcs</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/what-is-a-lockscreen.html b/posts/site_wip/what-is-a-lockscreen.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>what-is-a-lockscreen</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> @@ -36,8 +35,8 @@ <p>As of writing this, I use <a href="https://github.com/dannyfiresnake/xl">xl</a> as my lock screen. I started using this because I wanted my awesome background to display when my screen was locked, and after learning how X11 lock screens actually work, I realized the simplest way that’d suffice for me is to have the root window consume pointer and keyboard inputs via XGrabPointer and XGrabKeyboard respectively. Now I just swap DWM tags to a tag with no windows and press Mod4 and XK_l.</p> <h2 id="formalization">Formalization</h2> <p>A proper ritual for accessing a system fulfils the following requirement:</p> -<p><span class="math inline"><em>r</em> ∈ (<em>A</em><sub><em>i</em></sub> ∩ <em>B</em><sub><em>i</em></sub> ∩ ... ∪ <em>Z</em><sub><em>i</em></sub>) − <em>Γ</em><sub><em>i</em></sub></span></p> -<p>Where <span class="math inline"><em>A</em><sub><em>i</em></sub>, <em>B</em><sub><em>i</em></sub>, ..., <em>Z</em><sub><em>i</em></sub></span> are the sets of individuals who should be able to perform the ritual to access the system, and <span class="math inline"><em>Γ</em><sub><em>i</em></sub></span> is the collective intelligence of all individuals who shouldn’t have access to the system.</p> +<p><math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>r</mi><mo>∈</mo><mo stretchy="false" form="prefix">(</mo><msub><mi>A</mi><mi>i</mi></msub><mo>∩</mo><msub><mi>B</mi><mi>i</mi></msub><mo>∩</mo><mi>.</mi><mi>.</mi><mi>.</mi><mo>∪</mo><msub><mi>Z</mi><mi>i</mi></msub><mo stretchy="false" form="postfix">)</mo><mo>−</mo><msub><mi mathvariant="normal">Γ</mi><mi>i</mi></msub></mrow><annotation encoding="application/x-tex">r \in (A_i \cap B_i \cap ... \cup Z_i) - \Gamma_i</annotation></semantics></math></p> +<p>Where <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>A</mi><mi>i</mi></msub><mo>,</mo><msub><mi>B</mi><mi>i</mi></msub><mo>,</mo><mi>.</mi><mi>.</mi><mi>.</mi><mo>,</mo><msub><mi>Z</mi><mi>i</mi></msub></mrow><annotation encoding="application/x-tex">A_i, B_i, ..., Z_i</annotation></semantics></math> are the sets of individuals who should be able to perform the ritual to access the system, and <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msub><mi mathvariant="normal">Γ</mi><mi>i</mi></msub><annotation encoding="application/x-tex">\Gamma_i</annotation></semantics></math> is the collective intelligence of all individuals who shouldn’t have access to the system.</p> <p>In the case of multi-user system’s it’s often useful to have one ritual per-person to simplify the process of creating a shared ritual, and for traceability.</p> <p>Notably, to fulfil the ritual, one mustn’t be interrupted. Given this, time based rituals may be permissible in certain contexts. Things like proof of work, solving trivial problems, typing tests, and other things that are subject almost exclusively to time deltas can be rituals, assuming the amount of time it takes to perform the ritual is greater than the amount of time required to stop someone else from completing the ritual who isn’t in the user set.</p> <h2 id="uncommon-rituals">Uncommon Rituals</h2> diff --git a/posts/site_wip/what-makes-good-software.html b/posts/site_wip/what-makes-good-software.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>what-makes-good-software</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/why-people-build-spyware.html b/posts/site_wip/why-people-build-spyware.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>why-people-build-spyware</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/why-us-software-sucks.html b/posts/site_wip/why-us-software-sucks.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>why-us-software-sucks</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/wikipedia-and-truth-on-the-internet.html b/posts/site_wip/wikipedia-and-truth-on-the-internet.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>wikipedia-and-truth-on-the-internet</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/will-inference-costs-come-down.html b/posts/site_wip/will-inference-costs-come-down.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>will-inference-costs-come-down</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/yes-software-does-get-completed.html b/posts/site_wip/yes-software-does-get-completed.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>yes-software-does-get-completed</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/you-are-being-tricked.html b/posts/site_wip/you-are-being-tricked.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>you-are-being-tricked</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/your-arrogance-is-their-bet.html b/posts/site_wip/your-arrogance-is-their-bet.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>your-arrogance-is-their-bet</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/site_wip/your-gemini-search-engine.html b/posts/site_wip/your-gemini-search-engine.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> - <meta name="generator" content="pandoc 3.10.2" /> + <meta name="generator" content="pandoc 3.11" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>your-gemini-search-engine</title> <style> @@ -26,7 +26,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="style.css" /> </head> diff --git a/posts/wip/basic-software-profiling-cpu-usage.md b/posts/wip/basic-software-profiling-cpu-usage.md @@ -1,6 +1,8 @@ TODOS: + - since we support http(s) we mustn't hardcode file paths. -- foreseen results for file w/ python header +- review the ending stuff +- formatting for all the preformatted sections # Basic Software Profiling: CPU Usage @@ -256,20 +258,14 @@ perf stat foreseen lf.gmi 0 cpu-migrations:u # 0.0 migrations/sec migrations_per_second 6,551 page-faults:u # 90396.7 faults/sec page_faults_per_second 72.47 msec task-clock:u # nan CPUs CPUs_utilized - 154,134 branch-misses:u # 0.1 % branch_miss_rate - (88.98%) - 166,258,529 branches:u # 2294.2 M/sec branch_frequency - (88.99%) - 232,523,911 cpu-cycles:u # 3.2 GHz cycles_frequency - (88.96%) - 705,288,446 instructions:u # 3.0 instructions insn_per_cycle (88.93%) + 154,134 branch-misses:u # 0.1 % branch_miss_rate (88.98%) + 166,258,529 branches:u # 2294.2 M/sec branch_frequency (88.99%) + 232,523,911 cpu-cycles:u # 3.2 GHz cycles_frequency (88.96%) + 705,288,446 instructions:u # 3.0 instructions insn_per_cycle (88.93%) TopdownL1 # 7.6 % tma_backend_bound - # 23.2 % tma_bad_speculation - (88.96%) - # 18.8 % tma_frontend_bound - (77.41%) - # 50.4 % tma_retiring - (88.45%) + # 23.2 % tma_bad_speculation (88.96%) + # 18.8 % tma_frontend_bound (77.41%) + # 50.4 % tma_retiring (88.45%) 0.381682961 seconds time elapsed @@ -286,14 +282,14 @@ perf stat amfora lf.gmi 0 cpu-migrations:u # 0.0 migrations/sec migrations_per_second 900,174 page-faults:u # 12090.4 faults/sec page_faults_per_second 74,453.35 msec task-clock:u # nan CPUs CPUs_utilized - 229,042,926 branch-misses:u # 0.4 % branch_miss_rate (88.94%) - 62,713,218,442 branches:u # 842.3 M/sec branch_frequency (88.85%) - 153,193,058,619 cpu-cycles:u # 2.1 GHz cycles_frequency (88.97%) + 229,042,926 branch-misses:u # 0.4 % branch_miss_rate (88.94%) + 62,713,218,442 branches:u # 842.3 M/sec branch_frequency (88.85%) + 153,193,058,619 cpu-cycles:u # 2.1 GHz cycles_frequency (88.97%) 306,159,421,078 instructions:u # 2.0 instructions insn_per_cycle (88.90%) TopdownL1 # 0.6 % tma_backend_bound - # 97.8 % tma_bad_speculation (88.83%) - # -0.1 % tma_frontend_bound (77.86%) - # 1.7 % tma_retiring (88.91%) + # 97.8 % tma_bad_speculation (88.83%) + # -0.1 % tma_frontend_bound (77.86%) + # 1.7 % tma_retiring (88.91%) 28.983517177 seconds time elapsed