--===============0216344905== Content-Type: multipart/signed; boundary="nextPart8483480.x5zQM3JVrH"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart8483480.x5zQM3JVrH Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 30 July 2007 03:45:42 James Richard Tyrer wrote: > Profiling is used for macro-optimization, it has no place in peephole > optimization. In my experience, your point about micro-optimizations (or "peephole=20 optimizations", or whatever you want to call them) is simply wrong. I've run into a number of situations in my work projects where I'll perform= =20 some "obvious" micro-optimization (such as the one you are suggesting) only= =20 to have the profile numbers become significantly *worse*. (Unfortunately I= =20 can't give a specific example -- employer confidentiality and whatnot.) So Knuth's point about premature optimization definitely applies here --=20 profile *first*, to make sure the problem's where you think it is. Only=20 after you've profiled should you even begin to discuss how to fix it. =20 Then, once you've come up with a solution, profile *again* to test your=20 solution and make sure it actually works. Otherwise, you have no idea what is going on. Really, this is standard software engineering practice -- you have to=20 identify and confirm the problem before you fix it (profiling beforehand),= =20 fix it, then test to make sure you actually did (profiling afterward). You wouldn't close a bug without having tested to make sure your patch=20 works, would you? So why would you discount the importance of profiling=20 when performing optimizations? =2D-=20 Joshua J. Berry "I haven't lost my mind -- it's backed up on tape somewhere." -- /usr/games/fortune --nextPart8483480.x5zQM3JVrH Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.5 (GNU/Linux) iD8DBQBGtKqpaIxeYlQMsxsRAkyoAJ0aj90W6p50WxihozCJTMhuwWxliQCfZjSa bKvO8fk4vglFaswPrcOEt4Q= =3Nzx -----END PGP SIGNATURE----- --nextPart8483480.x5zQM3JVrH-- --===============0216344905== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============0216344905==--