diff --git a/doc/lexical.md b/doc/lexical.md index 717e8f97..7e083599 100644 --- a/doc/lexical.md +++ b/doc/lexical.md @@ -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 ∞ diff --git a/docs/doc/lexical.html b/docs/doc/lexical.html index 141bef45..aad0d3cd 100644 --- a/docs/doc/lexical.html +++ b/docs/doc/lexical.html @@ -144,7 +144,7 @@

Mutation

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 here. 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!

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 
 ⟨ ∞ ⟩
diff --git a/docs/implementation/perf.html b/docs/implementation/perf.html
index 31dac3ad..a949429f 100644
--- a/docs/implementation/perf.html
+++ b/docs/implementation/perf.html
@@ -15,7 +15,7 @@ 

How

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.

Performance resources

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 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 wF•_timed x or F´•_timed wx. 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 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 wF•_timed x or F´•_timed wx. 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
 
diff --git a/implementation/perf.md b/implementation/perf.md index 4624cb49..a6319d02 100644 --- a/implementation/perf.md +++ b/implementation/perf.md @@ -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