[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: |
Fri, 07 Sep 2001 12:21:35 +0200 |
[snip]
> You have manual control over the PIC.
> Why you can't simply have a macro generate the code in place ?
You don't know what values to use for the class compare/method jump
until run-time, so you'd have to make a list of all IC:s and patch them
when the program loads.
> Is the cost of the JMP to the stub worh ?
0.5-1 cycles. The unconditional jump is cheap, and lack of conditional
call instructions means that the stub can be slightly more efficient
than the IC ('call stub;compare;jz method;jmp lookup' instead of
'compare;jmp call_stub;call lookup;jmp cont;call_stub:call
method;cont:').
> > Theoretically, there's recompilation.
>
> Sorry, what do you mean ?
Collecting stats on test runs and using the information to inline common
methods and generate efficient IC:s. Not likely to happen anytime soon.
[snip]
> Objc has a simpler lookup because it doesn't have multiple inheritance,
> delegation
Doesn't forwarding and DO count as delegation?
> and dynamic inheritance.
Those are language limitations. The runtime could handle all of those
(at least if I'm thinking of the same things you are) at the same speed.
- Alexander Malmberg
- Re: objective-c: how slow ?, (continued)
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/01
- Re: objective-c: how slow ?, Helge Hess, 2001/09/01
- Re: objective-c: how slow ?, Malmberg, 2001/09/02
- Re: objective-c: how slow ?, Chris Hanson, 2001/09/02
- Re: objective-c: how slow ?, Malmberg, 2001/09/05
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/05
- Re: objective-c: how slow ?, Malmberg, 2001/09/05
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/05
- Re: objective-c: how slow ?,
Malmberg <=
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/07
- 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