narrowed down the problem area

downs default_357-line at yahoo.de
Fri Feb 15 08:37:31 PST 2008


downs wrote:
> Especially interesting to note (slow case):
> 
>     fstpl    -24(%ebp)
> [...]
>     movl    -24(%ebp), %eax
>     movl    %eax, -48(%ebp)
>     movl    -20(%ebp), %eax
>     movl    %eax, -44(%ebp)
> 
> Translation:
> 	Store floating-point number to ebp[-24]. No, wait, move it to ebp[-48].

I left something out.

    fstpl    -24(%ebp)
[...]
    movl    -24(%ebp), %eax
    movl    %eax, -48(%ebp)
    movl    -20(%ebp), %eax
    movl    %eax, -44(%ebp)
[...]
    fldl    -48(%ebp)


So, the whole thing comes down to "Store FP number to memory. No wait, move it somewhere else! No wait, read it back!"

No wonder it's slow.



More information about the Digitalmars-d mailing list