memoize: cleaner test case.

db4
John Benediktsson 2012-05-04 20:43:23 -07:00
parent bd1b3534b5
commit 47bb96d194
1 changed files with 1 additions and 3 deletions

View File

@ -35,10 +35,8 @@ unit-test
[ 9 ] [ 3 "q" get call ] unit-test
: foo ( x -- ) MEMO[ seconds sleep ] ;
[ t ] [
{ 1/8 1/8 1/8 1/8 1/16 1/16 1/16 }
[ [ foo ] each ] benchmark
[ [ MEMO[ seconds sleep ] ] each ] benchmark
0.18e9 0.25e9 between?
] unit-test