Skip to content

Commit

Permalink
Typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mlochbaum committed Nov 13, 2022
1 parent 2448631 commit e42111e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/lexical.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ With lexical scoping, variable mutation automatically leads to mutable data. Thi

### Aliasing

Mutable values exhibits *aliasing*. This means that when two variables refer to the same mutable value (or two copies of it exist generally), changes to one also affect the other.
Mutable values exhibit *aliasing*. This means that when two variables refer to the same mutable value (or two copies of it exist generally), changes to one also affect the other.

record ← { r←⟨⟩ ⋄ { r ∾↩ <𝕩 } }
Record ∞
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/lexical.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h2 id="mutation"><a class="header" href="#mutation">Mutation</a></h2>
</pre>
<p>With lexical scoping, variable mutation automatically leads to mutable data. This is because a function or modifier that depends on the variable value changes its behavior when the variable changes. So do objects; this slightly more concrete case is discussed <a href="oop.html#mutability">here</a>. The behavior change is observed by calling operations, and by accessing object fields. These are the only two actions that might behave differently when applied to the same values!</p>
<h3 id="aliasing"><a class="header" href="#aliasing">Aliasing</a></h3>
<p>Mutable values exhibits <em>aliasing</em>. This means that when two variables refer to the same mutable value (or two copies of it exist generally), changes to one also affect the other.</p>
<p>Mutable values exhibit <em>aliasing</em>. This means that when two variables refer to the same mutable value (or two copies of it exist generally), changes to one also affect the other.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=cmVjb3JkIOKGkCB7IHLihpDin6jin6kg4ouEIHsgciDiiL7ihqkgPPCdlakgfSB9ClJlY29yZCDiiJ4KClJlY29yZDIg4oaQIFJlY29yZCAgIyBDb3B5IHRoZSBmdW5jdGlvbgpSZWNvcmQyICJuZXciCgpSZWNvcmQgMCAgICMgVGhlIGFkZGVkIHZhbHVlICJuZXciIGlzIHNlZW4gaGVyZSBhcyB3ZWxs">↗️</a><pre> <span class='Value'>record</span> <span class='Gets'></span> <span class='Brace'>{</span> <span class='Value'>r</span><span class='Gets'></span><span class='Bracket'>⟨⟩</span> <span class='Separator'></span> <span class='Brace'>{</span> <span class='Value'>r</span> <span class='Function'></span><span class='Gets'></span> <span class='Function'>&lt;</span><span class='Value'>𝕩</span> <span class='Brace'>}</span> <span class='Brace'>}</span>
<span class='Function'>Record</span> <span class='Number'></span>
⟨ ∞ ⟩
Expand Down
2 changes: 1 addition & 1 deletion docs/implementation/perf.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1 id="how-does-bqn-perform"><a class="header" href="#how-does-bqn-perform">How
<p>Currently we aim for high performance on a single CPU core, and are focusing on 64-bit x86. CBQN won't use additional cores or a GPU for acceleration. It does make substantial use of x86 vector instructions up to AVX2 (2013) in the Singeli build, and will have more slow cases if built without Singeli. Comparisons are the hardest hit, as they rarely take too long with Singeli but can become a bottleneck without it.</p>
<h2 id="performance-resources"><a class="header" href="#performance-resources">Performance resources</a></h2>
<p>The spotty optimization coverage means that it's more accurate to say CBQN can be fast, not that it will be fast. Have to learn how to use it. Definitely ask on the forum if you're having performance troubles so you can find some tricks to use or request improvements.</p>
<p>There are two measurement tools in the <a href="../spec/system.html#time">time</a> system values. <code><span class='Function'>•MonoTime</span></code> is a high-precision timer for performance measurements; you can take a time before and after some operation or section of a program and subtract them to get a time in seconds (a profiling tool to do this automatically would be nice, but we don't have one). More convenient for small snippets, <code><span class='Modifier'>•_timed</span></code> returns the time to evaluate <code><span class='Function'>𝔽</span><span class='Value'>𝕩</span></code>, averaging over <code><span class='Value'>𝕨</span></code> runs if given. For two argument functions you can write <code><span class='Value'>w</span><span class='Modifier2'></span><span class='Function'>F</span><span class='Modifier'>•_timed</span> <span class='Value'>x</span></code> or <code><span class='Function'>F</span><span class='Modifier'>´•_timed</span> <span class='Value'>w</span><span class='Ligature'></span><span class='Value'>x</span></code>. CBQN also has a <code><span class='Paren'>)</span><span class='Value'>time</span></code> command that prints the time taken by an entire expression, not counting compilation time.</p>
<p>There are two measurement tools in the <a href="../spec/system.html#time">time</a> system values. <code><span class='Function'>•MonoTime</span></code> is a high-precision timer for performance measurements; you can take a time before and after some operation or section of a program and subtract them to get a time in seconds (a profiling tool to do this automatically would be nice, but we don't have one). More convenient for small snippets, <code><span class='Modifier'>•_timed</span></code> returns the time to evaluate <code><span class='Function'>𝔽</span><span class='Value'>𝕩</span></code>, averaging over <code><span class='Value'>𝕨</span></code> runs if given. For two-argument functions you can write <code><span class='Value'>w</span><span class='Modifier2'></span><span class='Function'>F</span><span class='Modifier'>•_timed</span> <span class='Value'>x</span></code> or <code><span class='Function'>F</span><span class='Modifier'>´•_timed</span> <span class='Value'>w</span><span class='Ligature'></span><span class='Value'>x</span></code>. CBQN also has a <code><span class='Paren'>)</span><span class='Value'>time</span></code> command that prints the time taken by an entire expression, not counting compilation time.</p>
<pre><span class='Number'>100</span> <span class='Function'>+</span><span class='Modifier'>´•_timed</span> <span class='Function'></span><span class='Number'>1e6</span> <span class='Comment'># Time +´ only
</span><span class='Paren'>)</span><span class='Value'>time</span><span class='Head'>:</span><span class='Number'>100</span> <span class='Function'>+</span><span class='Modifier'>´</span><span class='Function'></span><span class='Number'>1e6</span> <span class='Comment'># Time entire expression
</span></pre>
Expand Down
2 changes: 1 addition & 1 deletion implementation/perf.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Currently we aim for high performance on a single CPU core, and are focusing on

The spotty optimization coverage means that it's more accurate to say CBQN can be fast, not that it will be fast. Have to learn how to use it. Definitely ask on the forum if you're having performance troubles so you can find some tricks to use or request improvements.

There are two measurement tools in the [time](../spec/system.md#time) system values. `•MonoTime` is a high-precision timer for performance measurements; you can take a time before and after some operation or section of a program and subtract them to get a time in seconds (a profiling tool to do this automatically would be nice, but we don't have one). More convenient for small snippets, `•_timed` returns the time to evaluate `𝔽𝕩`, averaging over `𝕨` runs if given. For two argument functions you can write `w⊸F•_timed x` or `F´•_timed w‿x`. CBQN also has a `)time` command that prints the time taken by an entire expression, not counting compilation time.
There are two measurement tools in the [time](../spec/system.md#time) system values. `•MonoTime` is a high-precision timer for performance measurements; you can take a time before and after some operation or section of a program and subtract them to get a time in seconds (a profiling tool to do this automatically would be nice, but we don't have one). More convenient for small snippets, `•_timed` returns the time to evaluate `𝔽𝕩`, averaging over `𝕨` runs if given. For two-argument functions you can write `w⊸F•_timed x` or `F´•_timed w‿x`. CBQN also has a `)time` command that prints the time taken by an entire expression, not counting compilation time.

100 +´•_timed ↕1e6 # Time +´ only
)time:100 +´↕1e6 # Time entire expression
Expand Down

0 comments on commit e42111e

Please sign in to comment.