Handbook
Glossary
ant-benchmark ( -- )
Vocabulary
benchmark
.
ant
Inputs
None
Outputs
None
Definition
USING:
accessors
hash-sets
kernel
math
sequences
sets
vectors
;
IN:
benchmark.ant
::
ant-benchmark
( -- )
200000
<hash-set>
:>
seen 100000
<vector>
:>
stack 0
:>
total! 1000 1000
<point>
stack
push
[
stack
empty?
]
[
stack
pop
:>
p p seen
?adjoin
[
p
walkable?
[
total 1
+
total! p
clone
[
1
+
]
change-x
stack
push
p
clone
[
1
-
]
change-x
stack
push
p
clone
[
1
+
]
change-y
stack
push
p
clone
[
1
-
]
change-y
stack
push
]
when
]
when
]
until
total 148848
assert=
;