(Math with Bittians)
by Dennis Crombie
OSI Certified Open Source Software
this was the test:
(using bMathecx.inc)
invoke GetLocalTime, ADDR time1
xor esi, esi
fldz
fst timp
_lp1:
fcos ; compared against bFn's
fstp trash
fld timp
fadd _add
fst timp
inc esi
.if esi < 0ffffffh
jmp _lp1
.endif
invoke GetLocalTime, ADDR time2
xor esi, esi
fldz
fst timp
_lp2:
bCos ; then other bFn's (see bellow)
fstp trash
fld timp
fadd _add
fst timp
inc esi
.if esi < 0ffffffh
jmp _lp2
.endif
invoke GetLocalTime, ADDR time3
=======================================
results:
!!! these results don't show the difference
between the FPU and bMath, it shows the
difference between routine times when 1
FPU instruction is replaced with a bFn !!!
22.34
-------> 3.40
25.74--------> 2.29729797297 times faster
-------> 1.48
27.22
(FP Input for bFn in Bittians, FP Input for
fpuFn
in Radians)
=======================================
Snappy Angle Test
invoke GetLocalTime, ADDR time1
xor esi, esi
fldz
fst timp
_lp1:
fcos
fstp trash
fld timp
fadd _add
fst timp
inc esi
.if esi < 0ffffffh
jmp _lp1
.endif
invoke GetLocalTime, ADDR time2
xor esi, esi
fldz
fst timp
_lp2:
bSnapC
fstp trash
fld timp
fadd _add
fst timp
inc esi
.if esi < 0ffffffh
jmp _lp2
.endif
invoke GetLocalTime, ADDR time3
56.89
-------> 3.41
00.30 -------> 2.8181818181 times faster
-------> 1.21
01.51
(FP Input for bFn in Bittians, FP Input for
fpuFn
in Radians)
=======================================
Double Snappy Angle Test
invoke GetLocalTime, ADDR time1
xor esi, esi
fldz
fst timp
_lp1:
fcos
fstp trash
fld timp
fcos
fstp trash
fld timp
fadd _add
fst timp
inc esi
.if esi < 0ffffffh
jmp _lp1
.endif
invoke GetLocalTime, ADDR time2
xor esi, esi
fldz
fst timp
_lp2:
bSnapC
fstp trash
fld timp
bSnapC
fstp trash
fld timp
fadd _add
fst timp
inc esi
.if esi < 0ffffffh
jmp _lp2
.endif
invoke GetLocalTime, ADDR time3
43.77
------>
6.48
50.25 ------> 3.115384615 times faster
------>
2.08
52.33