Paste: mandelbrot inner loop

Author: slava
Mode: assembly-x86
Date: Sat, 8 Aug 2009 05:47:01
Plain Text |
0x07902f94: add    $0xfffffff8,%ecx
0x07902f97: movsd  %xmm3,%xmm6
0x07902f9b: movsd  %xmm1,%xmm4
0x07902f9f: cmp    $0x0,%ecx
0x07902fa2: jl     0x790309f
0x07902fa8: movsd  %xmm6,%xmm3
0x07902fac: mulsd  %xmm6,%xmm3
0x07902fb0: movsd  %xmm4,%xmm1
0x07902fb4: mulsd  %xmm4,%xmm1
0x07902fb8: subsd  %xmm1,%xmm3
0x07902fbc: movsd  %xmm6,%xmm1
0x07902fc0: mulsd  %xmm4,%xmm1
0x07902fc4: mulsd  %xmm6,%xmm4
0x07902fc8: addsd  %xmm4,%xmm1
0x07902fcc: addsd  %xmm5,%xmm3
0x07902fd0: addsd  %xmm2,%xmm1
0x07902fd4: movsd  %xmm3,%xmm6
0x07902fd8: mulsd  %xmm3,%xmm6
0x07902fdc: movsd  %xmm1,%xmm4
0x07902fe0: mulsd  %xmm1,%xmm4
0x07902fe4: addsd  %xmm4,%xmm6
0x07902fe8: mov    $0x20d345db,%edx
0x07902fed: movsd  0x5(%edx),%xmm4
0x07902ff2: ucomisd %xmm4,%xmm6
0x07902ff6: jb     0x7902f94

Annotation: original code

Author: slava
Mode: factor
Date: Sat, 8 Aug 2009 09:09:18
Plain Text |
! Generic arithmetic, boxed complex numbers and floats,
! closure construction, etc, all optimized out completely

: count-iterations ( z max-iterations step-quot test-quot -- #iters )
    '[ drop @ dup @ ] find-last-integer nip ; inline

: pixel ( c -- iterations )
    [ C{ 0.0 0.0 } max-iterations ] dip
    '[ sq _ + ] [ absq 4.0 >= ] count-iterations ; inline

New Annotation

Summary:
Author:
Mode:
Body: