JS speed - Konq vs. Mozilla

Koos Vriezen koos.vriezen at xs4all.nl
Wed Sep 4 21:22:02 BST 2002


On Wed, 4 Sep 2002, David Faure wrote:

> > > > Real speed gain should be found elsewhere. A gprof output for the tested
> > > > script, posted earlier in this thread, shows that KJS::Value::~Value() is
> > > > called 299335 and KJS::Value::imp() 356709 times!
> > >
> > > Shouldn't those be inlined, simply?
> >
> > Would it not break BC (value.h is installed)?
>
> No. Old code would still call the method, new code would benefit from being
> able to copy its contents. AFAIK this is no problem.

Can't see any speed gain with inlining KJS::Value::imp(),
KJS::Value::type(), KJS::Value::isNull() and
KJS::Value::Value(const Value&). Starting to doubt if these
numbers aren't from another test (not 0 to 1000, but to 5000 or even
10000), or I'm missing something here. Destructor is virtual, probably
wouldn't help.

> > Btw, any ideas why
> > 'putValue' is the only function where 'const Value' is not passed by
> > reference?
>
> Eek looks like a bug to me. That one can't be fixed in a BC way though :(

KDE4 :)

koos





More information about the kfm-devel mailing list