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

List:       kde-multimedia
Subject:    Re: SmartWrappers, all tests OK.
From:       Nicolas Brodu <nicolas.brodu () free ! fr>
Date:       2000-04-02 21:05:22
[Download RAW message or body]

Stefan Westerfeld wrote:
> 
> The implementation looks very clean. We should try to match all the "shoulds"
> of my previous mail. After that, smartwrappers could get fully integrated.
> 
> I've committed testwrapper.cc/wrapper.idl and put two small tests in there
> (there should probably be more).

I've added more from my pooltest.cc, but since they all PASS there's not much
use for now (apart from showing they PASS...)

> 
> Currently, the speed difference is really unacceptable.
> 
> KDE2@orion:~/src/kdelibs/arts/examples> testwrapper
>       generic inheritance test ... PASSED
>                speed for calls ... FAIL
>   -> old 19932230 calls/sec
>   -> new 110216 calls/sec
> 
> That means, using smartwrappers is 177 times slower than not using them.

Ah? I was amazed at what caching can do for you. Just by maintaining a cache to
the _base pointer, invalidated when necessary, I actually have now (avaraged on
100 times more calls than the original version, to smooth down the variance):

      generic inheritance test ... PASSED
  nullity and error conditions ... PASSED
         proper cache handling ... PASSED
      SmartWrapper as argument ... PASSED
               speed for calls ... PASSED
  -> old 6070957 calls/sec
  -> new 6767555 calls/sec

Yes! The SmartWrappers are _faster_ than the old code! Just to be sure, I
compiled with NDEBUG defined (removes the asserts), and it's still faster!
  -> old 6758704 calls/sec
  -> new 6962641 calls/sec


> Also, the other "shoulds" should be verified. But probably speed is the
> most important problem right now.

I'm not sure what 'fast creatable' means now that we have lazy create. But apart
from this, the only way to know for the others is to port the current code.

Cheers,
Nicolas
-- 
A shortcut is the longest distance between two points. (unknown author)

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

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