repo.or.cz
/
factor
/
jcg.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
remove math.blas.syntax and merge parsing words into math.blas.vectors/matrices
[factor/jcg.git]
/
extra
/
benchmark
/
fib1
/
fib1.factor
blob
20f18032f045f327c04dd127f08b80ab5a4de97d
1
USING: math.private kernel debugger ;
2
IN: benchmark.fib1
3
4
: fast-fixnum-fib ( m -- n )
5
dup 1 fixnum<= [
6
drop 1
7
] [
8
1 fixnum-fast dup fast-fixnum-fib
9
swap 1 fixnum-fast fast-fixnum-fib fixnum+fast
10
] if ;
11
12
: fib-main ( -- ) 34 fast-fixnum-fib 9227465 assert= ;
13
14
MAIN: fib-main