|
( This file is part of muFORTH: http://pages.nimblemachines.com/muforth Copyright 2002-2008 David Frech. All rights reserved, and all wrongs reversed. (See the file COPYRIGHT for details.) ( simple test of speed of parser and dict search) ( Create a new mode) -: ." (parse test)" ; -: .compiler. find if drop ^ then .forth. find if drop ^ then ( 2drop) ( 2dup type space) (new) ; mode parser : parser-load 1 10 for parser dup . 1+ push dup load-file canonical pop next 2drop ; ." Parsing..." ( z" /usr/share/dict/words" parser-load ) ( z" README" parser-load) z" /home/david/command.txt" parser-load ( z" /usr/local/share/doc/mutt/manual.txt" parser-load) ( z" words.50000" parser-load) ." done." cr words cr #data . bye |