
1 Mar
2006
1 Mar
'06
7:11 a.m.
FWIW, here's the inner loop of the accumulating parameter factorial compiled with yesterday's HEAD on x86_64, via C: Fac_zdwfac_info: movq %rsi, %rax testq %rsi, %rsi jne .L4 movq %rdi, %rbx jmp *(%rbp) .L4: leaq -1(%rsi), %rsi imulq %rax, %rdi jmp Fac_zdwfac_info It's not perfect, but note the absence of memory operations. The NCG version is similar, but has a couple of extra reg-to-reg moves (we need to beef up the NCG optimisations a bit). Cheers, Simon