[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: objective-c: how slow ?
From: |
Malmberg |
Subject: |
Re: objective-c: how slow ? |
Date: |
Sun, 09 Sep 2001 00:57:56 +0200 |
> I don't understand. You inline a call, and this call will push the ip. The
> call will return and you go straight off.
But the different calls will return to different places, so you'll need
jumps to merge the branches.
Outline cache:
pushl arg_2
pushl arg_1
pushl receiver
pushl selector
call stub
// done
stub:
movl 4(%esp),%eax
testl %eax,%eax
jz objc_nil_method
movl (%eax),%eax
cmpl $some_class,%eax
jz some_method
jmp real_lookup
Inline cache:
pushl arg_2
pushl arg_1
pushl receiver
pushl selector
movl receiver,%eax
testl %eax,%eax
jz handle_nil
movl (%eax),%eax
cmpl $some_class,%eax
jz handle_class
call real_lookup
jmp merge
handle_nil:
call objc_nil_method
jmp merge
handle_class:
call some_method
merge:
// done
The path for a cache hit is the same length in both versions.
[snip]
> yes. but you don't know who are the callers. IC optimization is caller based,
> not target based. Some callers can benefit from it, others can only loose
This is probably the worst drawback, and I can't see any good way to fix
it.
- Alexander Malmberg
- Re: objective-c: how slow ?, (continued)
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/07
- Re: objective-c: how slow ?, Erik M. Buck, 2001/09/07
- Re: objective-c: how slow ?, Erik M. Buck, 2001/09/07
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/07
- Re: objective-c: how slow ?, Malmberg, 2001/09/08
- Re: objective-c: dynamic inheritance and s-arrays [was: how slow] ?, Marko Mikulicic, 2001/09/08
- Re: objective-c: how slow ?, Richard Frith-Macdonald, 2001/09/07
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/07
- Re: objective-c: how slow ?, Malmberg, 2001/09/07
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/07
- Re: objective-c: how slow ?,
Malmberg <=
RE: objective-c: how slow ?, Bissell, Tim, 2001/09/10