--===============0942833029== Content-Type: multipart/signed; boundary="nextPart6818685.IOxxVpl7Ns"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart6818685.IOxxVpl7Ns Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday, 17. October 2007 11:51:39 Thomas Zander wrote: > On Wednesday 17 October 2007 11:12:54 Stefan Nikolaus wrote: > > KSpread::Value is used a lot and the last time I've checked it was more > > lightweight as QVariant. > > Hmm, reading the source code I'm not so sure about that statement; > > QVariant takes 32 bits plus one pointer (32 or 64 bits depending on > architecture). > 32 bits as members, and the pointer in the union. It also takes a d-pointer, but which is not shared generally (the shared=20 pointer is part of the union in the private. Don't know what trick hides=20 behind this. Sharing only if necessary or only complex types?) > KSpread::Value takes one (d)pointer, 8 bits and another pointer. > the dpointer is QSharedDataPointer d; > 8 bits as members, and the pointer in the union. > > This means that the kspread one takes more memory then the qvariant one, > upto 8 bytes more. You're refering to the d-pointer you missed for QVariant. Not because of th= at,=20 but maybe it takes more, due to the fact, that Value always shares the data= ,=20 a QAtomic (an integer?) is always occupied. A quick check gives me (AMD64): kspread(17556) KSpread::Value::Value: sizeof(QVariant)=3D 16 kspread(17556) KSpread::Value::Value: sizeof(QVariant::Private)=3D 16 kspread(17556) KSpread::Value::Value: sizeof(Value)=3D 16 kspread(17556) KSpread::Value::Value: sizeof(Value::Private)=3D 16 Either way, if you think, it's worth the effort for whatever reason go ahea= d.=20 I don't mind. > On > the other hand, I have some faith in the hackers-capabilities of the Trol= ls > ;) Hmm, knowing one of the new trolls I'm not so sure about that statement; ;) =2D-=20 Regards, Stefan --nextPart6818685.IOxxVpl7Ns Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQBHFe+TpfDn2DABIpcRArMDAKCT1nKuMVClhO17ob0GGbBds/F0UQCgt4f4 jknSfS3HZUQZmj4N5V9/zpU= =lDhU -----END PGP SIGNATURE----- --nextPart6818685.IOxxVpl7Ns-- --===============0942833029== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel --===============0942833029==--