]> gitweb.factorcode.org Git - factor.git/commitdiff
some simple benchmarks
authorSlava Pestov <slava@factorcode.org>
Tue, 24 Aug 2004 03:27:55 +0000 (03:27 +0000)
committerSlava Pestov <slava@factorcode.org>
Tue, 24 Aug 2004 03:27:55 +0000 (03:27 +0000)
library/test/benchmark/empty-loop.factor [new file with mode: 0644]
library/test/benchmark/fib.factor [new file with mode: 0644]
library/test/benchmark/sort.factor [new file with mode: 0644]

diff --git a/library/test/benchmark/empty-loop.factor b/library/test/benchmark/empty-loop.factor
new file mode 100644 (file)
index 0000000..ae7fa23
--- /dev/null
@@ -0,0 +1,5 @@
+IN: scratchpad
+USE: arithmetic
+USE: test
+
+[ 2000000 [ ] times ] time
diff --git a/library/test/benchmark/fib.factor b/library/test/benchmark/fib.factor
new file mode 100644 (file)
index 0000000..948d385
--- /dev/null
@@ -0,0 +1,5 @@
+IN: scratchpad
+USE: math
+USE: test
+
+[ 35 fib ] time
diff --git a/library/test/benchmark/sort.factor b/library/test/benchmark/sort.factor
new file mode 100644 (file)
index 0000000..a6f7dc5
--- /dev/null
@@ -0,0 +1,8 @@
+IN: scratchpad
+USE: arithmetic
+USE: lists
+USE: random
+USE: stack
+USE: test
+
+[ [, 100000 [ 0 10000 random-int , ] times ,] num-sort drop ] time