benchmarking confusion

Stephen Weeks MLton@sourcelight.com
Thu, 19 Jul 2001 15:54:03 -0700


> What is the actual difference (if any) in the generated code?  It would be
> enough to look at the spy output.

Here is -local-flatten false.

0x8049267:	mov    0x3c(%edi),%esp
0x804926a:	mov    0x34(%edi),%ebp
0x804926d:	cmp    %ebp,%esp
0x804926f:	je     0x80494dc
0x8049275:	dec    %ebp
0x8049276:	jo     0x8049504
0x804927c:	sub    %esp,%ebp
0x804927e:	jo     0x8049510
0x8049284:	mov    0x30(%edi),%edx
0x8049287:	cmp    0xfffffff8(%edx),%ebp
0x804928a:	jae    0x804951c
0x8049290:	mov    0x38(%edi),%ecx
0x8049293:	mov    %esp,%ebx
0x8049295:	mov    (%edx,%ebp,4),%esp
0x8049298:	mov    %esp,(%ecx,%ebx,4)
0x804929b:	inc    %ebx
0x804929c:	jo     0x8049528
0x80492a2:	mov    %ebx,0x3c(%edi)
0x80492a5:	jmp    0x8049267

Here is -local-flatten true.

0x804916f:	mov    0x2c(%edi),%esp
0x8049172:	mov    0x24(%edi),%ebp
0x8049175:	cmp    %ebp,%esp
0x8049177:	je     0x80493dc
0x804917d:	dec    %ebp
0x804917e:	jo     0x804940c
0x8049184:	sub    %esp,%ebp
0x8049186:	jo     0x8049418
0x804918c:	mov    0x1c(%edi),%edx
0x804918f:	cmp    0xfffffff8(%edx),%ebp
0x8049192:	jae    0x8049424
0x8049198:	mov    0x28(%edi),%ecx
0x804919b:	mov    %esp,%ebx
0x804919d:	mov    (%edx,%ebp,4),%esp
0x80491a0:	mov    %esp,(%ecx,%ebx,4)
0x80491a3:	inc    %ebx
0x80491a4:	jo     0x8049430
0x80491aa:	mov    %ebx,0x2c(%edi)
0x80491ad:	jmp    0x804916f

Looks the same to me.

> I don't know if it is worth a reboot, but you
> might give it a shot.

Not worth it for now.