diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-06-13 13:20:34 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-06-13 13:20:34 -0400 |
| commit | 0d6c26b9aa607ff14e14e6488bace207e324022a (patch) | |
| tree | 08c8900cc47d2b3aafa41dc37f96b36452584829 /docs/implementation | |
| parent | dcbb72306821e0856c32944a54ea93902ef2949f (diff) | |
Highlight [] as list brackets, like ⟨⟩
Diffstat (limited to 'docs/implementation')
| -rw-r--r-- | docs/implementation/kclaims.html | 4 | ||||
| -rw-r--r-- | docs/implementation/vm.html | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/implementation/kclaims.html b/docs/implementation/kclaims.html index c92318c3..670187b3 100644 --- a/docs/implementation/kclaims.html +++ b/docs/implementation/kclaims.html @@ -38,7 +38,7 @@ </pre> <p><code><span class='Value'>cycles</span></code> is the total number of CPU cycles run. <code><span class='Function'>L1-</span><span class='Value'>dcache</span><span class='Function'>-</span><span class='Value'>load</span><span class='Function'>-</span><span class='Value'>misses</span></code> shows L1 data cache misses and <code><span class='Function'>L1-</span><span class='Value'>icache</span><span class='Function'>-</span><span class='Value'>load</span><span class='Function'>-</span><span class='Value'>misses</span></code> shows the instruction cache misses; <code><span class='Value'>cache</span><span class='Function'>-</span><span class='Value'>misses</span></code> shows accesses that miss every layer of caching, which is a subset of those two (more detailed explanation <a href="https://stackoverflow.com/questions/55035313/how-does-linux-perf-calculate-the-cache-references-and-cache-misses-events">here</a>). <code><span class='Value'>icache_16b.ifdata_stall</span></code> is a little fancy. Here's the summary given by <code><span class='Value'>perf</span> <span class='Value'>list</span></code>:</p> <pre> <span class='Value'>icache_16b.ifdata_stall</span> - <span class='Value'>[</span><span class='Function'>Cycles</span> <span class='Value'>where</span> <span class='Value'>a</span> <span class='Value'>code</span> <span class='Value'>fetch</span> <span class='Value'>is</span> <span class='Value'>stalled</span> <span class='Value'>due</span> <span class='Value'>to</span> <span class='Function'>L1</span> <span class='Value'>instruction</span> <span class='Value'>cache</span> <span class='Value'>miss]</span> + <span class='Bracket'>[</span><span class='Function'>Cycles</span> <span class='Value'>where</span> <span class='Value'>a</span> <span class='Value'>code</span> <span class='Value'>fetch</span> <span class='Value'>is</span> <span class='Value'>stalled</span> <span class='Value'>due</span> <span class='Value'>to</span> <span class='Function'>L1</span> <span class='Value'>instruction</span> <span class='Value'>cache</span> <span class='Value'>miss</span><span class='Bracket'>]</span> </pre> <p>That's just the whole cost (in cycles) of L1 misses, exactly what we want! First I'll run this on a J program I have lying around, building my old <a href="https://cdr.lib.unc.edu/concern/honors_theses/pg15bk00p">Honors thesis</a> with <a href="https://github.com/mlochbaum/JtoLaTeX">JtoLaTeX</a>.</p> <pre> <span class='Function'>Performance</span> <span class='Value'>counter</span> <span class='Value'>stats</span> <span class='Value'>for</span> <span class='String'>'</span><span class='Value'>jlatex</span> <span class='Value'>document.jtex</span> <span class='Value'>nopdf</span><span class='String'>'</span><span class='Head'>:</span> @@ -73,7 +73,7 @@ <span class='Number'>2.138414849</span> <span class='Value'>seconds</span> <span class='Value'>time</span> <span class='Value'>elapsed</span> </pre> <p>And the Python-based font tool I use to build <a href="https://mlochbaum.github.io/BQN/fonts.html">font samples</a> for this site:</p> -<pre> <span class='Function'>Performance</span> <span class='Value'>counter</span> <span class='Value'>stats</span> <span class='Value'>for</span> <span class='String'>'</span><span class='Value'>pyftsubset</span> <span class='Value'>[…more</span> <span class='Value'>stuff]</span><span class='String'>'</span><span class='Head'>:</span> +<pre> <span class='Function'>Performance</span> <span class='Value'>counter</span> <span class='Value'>stats</span> <span class='Value'>for</span> <span class='String'>'</span><span class='Value'>pyftsubset</span> <span class='Bracket'>[</span><span class='Value'>…more</span> <span class='Value'>stuff</span><span class='Bracket'>]</span><span class='String'>'</span><span class='Head'>:</span> <span class='Number'>499</span><span class='Separator'>,</span><span class='Number'>025</span><span class='Separator'>,</span><span class='Number'>775</span> <span class='Value'>cycles</span><span class='Head'>:</span><span class='Value'>u</span> <span class='Number'>24</span><span class='Separator'>,</span><span class='Number'>869</span><span class='Separator'>,</span><span class='Number'>974</span> <span class='Value'>icache_16b.ifdata_stall</span><span class='Head'>:</span><span class='Value'>u</span> diff --git a/docs/implementation/vm.html b/docs/implementation/vm.html index ba96ac12..7a0093db 100644 --- a/docs/implementation/vm.html +++ b/docs/implementation/vm.html @@ -43,7 +43,7 @@ <p>The starting index refers to the position in bytecode where execution starts in order to evaluate the block. Different bodies will always have the same set of special names, but the variables they define are unrelated, so of course they can have different counts. The given number of variables includes special names, but list of names and export mask don't.</p> <p>The program's symbol list is included in the tokenization information <code><span class='Value'>t</span></code>: it is <code><span class='Number'>0</span><span class='Function'>⊑</span><span class='Number'>2</span><span class='Function'>⊑</span><span class='Value'>t</span></code>. Since the entire program (the source code passed in one compiler call) uses this list, namespace field accesses can be performed with indices alone within a program. The symbol list is needed for cross-program access, for example if <code><span class='Function'>•BQN</span></code> returns a namespace.</p> <h3 id="instructions"><a class="header" href="#instructions">Instructions</a></h3> -<p>The following instructions are defined (those without names are tentatively reserved only). The ones emitted by the self-hosted BQN compiler are marked in the "used" column. Only those marked "X" are needed to support the compiler and self-hosted runtime. "NS" indicates instructions used only in programs with namespaces, "HE" is for headers <code><span class='Head'>:</span></code> or predicates <code><span class='Head'>?</span></code>, and "HR" is for high-rank array notation <code><span class='Value'>[]</span></code>.</p> +<p>The following instructions are defined (those without names are tentatively reserved only). The ones emitted by the self-hosted BQN compiler are marked in the "used" column. Only those marked "X" are needed to support the compiler and self-hosted runtime. "NS" indicates instructions used only in programs with namespaces, "HE" is for headers <code><span class='Head'>:</span></code> or predicates <code><span class='Head'>?</span></code>, and "HR" is for high-rank array notation <code><span class='Bracket'>[]</span></code>.</p> <table> <thead> <tr> @@ -134,7 +134,7 @@ <td align="center">HR</td> <td align="right"></td> <td align="left"></td> -<td>Merge top of stack (for <code><span class='Value'>[]</span></code>)</td> +<td>Merge top of stack (for <code><span class='Bracket'>[]</span></code>)</td> </tr> <tr> <td align="right">10</td> |
