From 93e146e35d96cef31b0727482a2ad5bdc8df1dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Wed, 15 Mar 2017 01:15:17 +0100 Subject: [PATCH] Sketch for a performance test. --- test/test-performance.rkt | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/test/test-performance.rkt b/test/test-performance.rkt index 3cd09d3..8069fc0 100644 --- a/test/test-performance.rkt +++ b/test/test-performance.rkt @@ -2,17 +2,20 @@ (require subtemplate/override) -#;(time - (syntax-case #'((((0 1 2 3 4 5 6 7 8 9)))) () - [((((a b c d e f g h i j) …) …) …) - #'(a … … …)])) - -#;(time - (syntax-case #'((((0 1 2 3 4 5 6 7 8 9)))) () - [((((a b c d e f g h i j) …) …) …) - (list #'a … … …)])) +(time + (syntax-case #'((((0 1 2 3 4 5 6 7 8 9)))) () + [((((a b c d e f g h i j) …) …) …) + #'(a … … …)])) (time - (syntax-case #'(((0 1 2 3 4 5 6 7 8 9))) () - [(((a b c d e f g h i j) …) …) - (list #'a … …)])) \ No newline at end of file + (syntax-case #'((((0 1 2 3 4 5 6 7 8 9)))) () + [((((a b c d e f g h i j) …) …) …) + (list #'a … … …)])) + +;; raco expand this-file.rkt | wc +;; shows that there are 160 extra words for each additional level of nesting +;; for the following code, between 2 and 5 (inclusive) levels of nesting. +(time + (syntax-case #'((((((0 1 2 3 4 5 6 7 8 9)))))) () + [((((((a b c d e f g h i j) …) …) …) …) …) + (list #'a … … … … …)])) \ No newline at end of file