Re: Vtable speed worry

2000-08-20 Thread Nick Ing-Simmons
David L . Nicol <[EMAIL PROTECTED]> writes: >No, because each table lookup takes less time than comparing one >letter of a text string. Er, I don't think so. A lookup takes serveral cycles on a RISC machine due to memory latency even to the cache. A pipelined string compare takes less than a c

Re: Vtable speed worry

2000-08-20 Thread Nick Ing-Simmons
Simon Cozens <[EMAIL PROTECTED]> writes: >I'm obviously missing something about vtables. It'll be obvious when someone >corrects me, but... > >Currently, SvPVX(foo) requires one lookup; with a vtable, it would necessitate >two, (One to find the functino in "foo", and then the functino must find th

Re: Vtable speed worry

2000-08-19 Thread Ken Fox
Simon Cozens wrote: > Currently, SvPVX(foo) requires one lookup No lookups at all -- SvPVX(foo) is just a pointer offset, i.e. an add. > with a vtable, it would necessitate two, (One to find the functino in "foo", > and then the functino must find the data in "foo") It would probably work somet

Re: Vtable speed worry

2000-08-18 Thread Simon Cozens
On Fri, Aug 18, 2000 at 09:02:21AM +0100, Hildo Biersma wrote: > > sv->vtable->svpvx; > > > > Isn't this going to really, really hurt? > > Doing three C pointer lookups is going to be less expensive than > invoking a subroutine But you're doing that as well. vtables store function pointers.

Re: Vtable speed worry

2000-08-18 Thread Hildo Biersma
Simon Cozens wrote: > > I'm obviously missing something about vtables. It'll be obvious when someone > corrects me, but... > > Currently, SvPVX(foo) requires one lookup; with a vtable, it would necessitate > two, (One to find the functino in "foo", and then the functino must find the > data in "

Re: Vtable speed worry

2000-08-18 Thread David L. Nicol
No, because each table lookup takes less time than comparing one letter of a text string. > sv->vtable->svpvx; > > Isn't this going to really, really hurt? -- David Nicol 816.235.1187 [EMAIL PROTECTED] Does despair.com sell a discordia