On Saturday 06 October 2001 08:05 pm, Buggs wrote:
> On Sunday 07 October 2001 01:16, Bryan C. Warnock wrote:
> [...]
>
> > One of the more interesting discoveries?  Adding a 'default:' case to
> > the switch slowed down the Linux runs by several percent.
>
> In that, umh, case: do you have an explanation
> or could you provide the code?

http://members.home.net/bcwarno/Perl6/spool/interpreter.c
http://members.home.net/bcwarno/Perl6/spool/switch.cinc

An assembler diff between adding the default and not.  I'd interpret it, but 
I haven't figured out exactly how yet.  (These diffs are repeated later on 
in the other runops loop.  I snipped them for brevity.)  The default case 
wasn't exercised during runtime, so it has to be related to the Athlon, 
which I know behaves weirdly.

175c175
<       ja      .L212
---
>       ja      .L11
179c179
<       movl    .L213(%eax), %eax
---
>       movl    .L212(%eax), %eax
185c185
< .L213:
---
> .L212:
3126,3130d3125
< .L212:
<       leal    -40(%ebp), %eax
<       addl    $4, (%eax)
<       jmp     .L11
<       .p2align 4,,7

-- 
Bryan C. Warnock
[EMAIL PROTECTED]

Reply via email to