aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/wiki_src/technical
diff options
context:
space:
mode:
Diffstat (limited to 'docs/wiki_src/technical')
-rw-r--r--docs/wiki_src/technical/arithmetic.md0
-rw-r--r--docs/wiki_src/technical/performance.md24
-rw-r--r--docs/wiki_src/technical/reduction.md12
3 files changed, 36 insertions, 0 deletions
diff --git a/docs/wiki_src/technical/arithmetic.md b/docs/wiki_src/technical/arithmetic.md
deleted file mode 100644
index e69de29..0000000
--- a/docs/wiki_src/technical/arithmetic.md
+++ /dev/null
diff --git a/docs/wiki_src/technical/performance.md b/docs/wiki_src/technical/performance.md
new file mode 100644
index 0000000..05fd683
--- /dev/null
+++ b/docs/wiki_src/technical/performance.md
@@ -0,0 +1,24 @@
+# Performance
+
+The reduction of lambda calculus is (practically) not very efficient. As
+an extension, bruijn also suffers from bad performance.
+
+Bruijn's interpreter works by substituting the entire program into one
+huge lambda calculus term that will then get reduced by the
+[reducer](reduction.md). As a result, many equivalent terms get
+evaluated multiple times (although some of this get's solved by bruijn's
+call-by-need reduction strategy). We currently work on a solution that
+reduces all equivalent terms as one, which turns out is not actually
+that trivial. Follow the [blog](https://text.marvinborner.de) to keep up
+to date with the development.
+
+Aside from that, bruijn is still much faster than most of the hobby
+programming languages based on pure lambda calculus. This is because of
+the [RKNL reducer](reduction.md) and our choice of default [number/byte
+encodings](../coding/data-structures.md).
+
+``` bruijn
+> :import std/Math .
+> :time fac (+30)
+0.15 seconds
+```
diff --git a/docs/wiki_src/technical/reduction.md b/docs/wiki_src/technical/reduction.md
index e69de29..97bd78f 100644
--- a/docs/wiki_src/technical/reduction.md
+++ b/docs/wiki_src/technical/reduction.md
@@ -0,0 +1,12 @@
+# Reduction
+
+Bruijn uses the RKNL abstract machine reducer[^1]. RKNL uses the
+call-by-need reduction strategy, similar to Haskell and other functional
+programming languages. For you this means that you have efficient
+support for [laziness](../coding/laziness.md) with generally less
+redundant reductions.
+
+[^1]: [Biernacka, MaƂgorzata, Witold Charatonik, and Tomasz Drab. "A
+ simple and efficient implementation of strong call by need by an
+ abstract machine." Proceedings of the ACM on Programming Languages
+ 6.ICFP (2022): 109-136.](https://doi.org/10.5281/zenodo.6786796)