diff --git a/extra/benchmark/namespaces/namespaces.factor b/extra/benchmark/namespaces/namespaces.factor new file mode 100644 index 0000000000..783f9a4105 --- /dev/null +++ b/extra/benchmark/namespaces/namespaces.factor @@ -0,0 +1,29 @@ +! Copyright (C) 2014 John Benediktsson +! See http://factorcode.org/license.txt for BSD license + +USING: kernel math namespaces ; + +IN: benchmark.namespaces + +SYMBOL: foo +SYMBOL: bar +SYMBOL: baz + +: namespaces-benchmark ( -- ) + 200 [ + 123 foo [ + 200 [ + 456 bar [ + 200 [ + 789 baz [ + foo get 123 assert= + bar get 456 assert= + baz get 789 assert= + ] with-variable + ] times + ] with-variable + ] times + ] with-variable + ] times ; + +MAIN: namespaces-benchmark