[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: ANNOUNCE: KDiskNavigator (quick filesystem navigation from KPanel)
From:       Stefan Westerfeld <stefan () space ! twc ! de>
Date:       1998-08-09 13:00:38
[Download RAW message or body]

   Hi!

On Thu, Aug 06, 1998 at 02:41:42PM +0200, Steffen Hansen wrote:
> > Actually, it's not the same performace. I have created an empty void
> > method, and called it 100000000 times. The results were, that the mico
> > shlib implemtation needs about 9.5 seconds to do this, a plain C++
> > version needs about 4.5 seconds.  ;-)
> 
> Strange. Your plain C++ version should define a base class with a pure
> virtual function and (in a separate file) a sub class which implements
> the function. Make sure your compiler doesn't optimize away the _virtual_
> call.
> 
> Did you do it this way?

Yes I did. One thing I noticed is that a call to a_corba_var->method()
will evaluate special code for the -> - operator, but I am not sure wether
this makes no difference because the compiler can do this inlined.

I tried to step through with gdb, and I got:

(gdb)
27              for(i=0;i<MAX;i++) h->calculate(7);
(gdb) step
0x4030761c in virtual function thunk (delta:-60) for Hello_impl::calculate ()
at server.cc:28
28          server = new Hello_impl;
(gdb)
Hello_impl::calculate (this=0x80570e0, add=7) at server.cc:13
13                      i += add;
(gdb)

What means "virtual function thunk"? And what is he doing there? I suppose
he doesn't create a new server for each invocation, though gdb tries to
tell me that!?

> > Call me crazy, but I currently need millions of invocations per second
> > in KSynth, and don't want to use mico for plugins due to that... but
> > perhaps this can be changed by carefully redesigning the KSynth
> > algorithms ;)
> 
> Why do you need that many invocations? I thought a synth player would only
> need a call per played key.

KSynth is modular, that means you have for instance a Synth_SIN object,
which takes a signal, and computes sin values, or a Synth_RC object, which
takes a signal and simulates a LRC-resonator.

Currently, the objects calculate only the value for one sample in each
invocation, since feedback loops are allowed.

The user can later plug together the modules. I am looking for a lightwight
plugin mechanism for extending KSynth without recompiling. I thought mico
shlibs might be ok, but I am not sure yet.

If somebody wants to join discussion/development, please subscribe to the
KSynth mailing list (go to http://space.twc.de/~stefan/kde), since this
is probably offtopic here ;)

  Cu... Stefan
-- 
  -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Freiburg/Germany
     KDE Developer, project infos at http://space.twc.de/~stefan/kde *-

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic