From 1f7231153c172500f1073ddb22ec911379f83a07 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 6 Nov 2023 18:50:35 +0100 Subject: Improved wiki and reduced readme --- docs/wiki_src/technical/performance.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/wiki_src/technical/performance.md (limited to 'docs/wiki_src/technical/performance.md') 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 +``` -- cgit v1.2.3