tiny perceus fix, but mostly wrote match+rb-tree f-expr/macro for newLisp and benchmarked it. kraken 5-15x faster than newlisp-rbtree-macro, 137x faster than newlisp-rbtree-fexpr. I was suprised at first that the macro and fexpr versions were so close at 8.7x (while interpreted kraken rbtree is 50,000x slower), but after thinking about it it makes sense - the Kraken version has slowdown exponential in the multiple levels of f-exprs ('match' is an fexpr, but then so is 'let' and 'and' and 'lambda'), whereas the newLisp f-expr runtime expands to fast builtins ('let', 'and', etc). And all that exponential f-expr slowdown gets compiled away in Kraken!

This commit is contained in:
Nathan Braswell
2022-07-06 02:34:48 -04:00
parent 2cdfa4dbed
commit e95feb9309
7 changed files with 235 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
set(copy_wrapper "../../copy_wrapper.sh")
set(sources newlisp-fib.nl newlisp-fib-let.nl)
set(sources newlisp-fib.nl newlisp-fib-let.nl newlisp-builtin-rbtree.nl newlisp-slow-fexpr-rbtree.nl newlisp-macro-rbtree.nl )
foreach (source IN LISTS sources)
get_filename_component(name "${source}" NAME_WE)