Re: [PATCH] Add checks for new and tmp directories to mx_is_maildir()
Milan Straka <[email protected]>
| Newsgroups | gmane.mail.mutt.devel |
|---|---|
| Message-ID | <aYXsvp5vFQaVSemI@tensor> |
Hi all, > -----Original message----- > From: "Kevin J. McCarthy" <[email protected]> > Sent: 6 Feb 2026, 09:41 > > On Thu, Feb 05, 2026 at 02:57:47AM +0100, Gero Treuner wrote: > > Out of curiosity I rewrote it to iterate over the three subdirectory > > names and compared the difference in size of the binaries. In this > > case it apparently is dominated by (debug) symbols and not hitting a > > threshold for reduced size of a fully stripped binary on my system. > > > > So having done this anyway, I propose an optimization utilizing the > > uniform length of the names. (Further compacting the code saves more > > space but degrades readability of the logic.) > > Thanks Gero! I certainly agree it's more optimized. :D > > However, I personally argue for code clarity except when optimization is > called for. In this case, I don't think it's worth the trade off. See just > below the function in mh.c, mx_is_mh(), for similar code, also called by > mx_get_magic(). > > As always, if others disagree please just say so. personally I see it the same way, considering readability and simplicity a big priority; parsing the proposed version is (at least for me) much harder than the original version. Cheers, Milan S.
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEv7AjFJMzCctYtAgRcf41aucGSU0FAmmF7L0ACgkQcf41aucG SU2EHA/+J56wFahPIJ6IUhZ3WGHgdguIEC6jYKovDOjc8Cfi42cbksxRqurIhv29 wJhkecyK1RYHrmQt0ci+vgwwBSm5V8o6s1ON6E3NC1gAoJXyoiCdudYqsqxJ9eep 7LCk0Lh5D68hB0qy2p7cGvWCQ9H7o0s9W8uZLL3MZTCzsZGYVJurTBhhdeW/I8Q7 sGCsmDM+teSkkg3il4oHdHTo/b7SMuJH5og2dA7t1vLhBL0i1yMlosp9iHuPwAAC V578w+oksAo3bfVmuxk7E4/6ru1PqK8FVGALiOkJkjDoAWiRk5XdhNpbPkEhhYq3 QFpUqgshd+eIjA3BHWoaLKxFpSfHcyrks5OJlcJEbA8cxOkugE3PugTu0jSmMmXy CHgmoGLZNTG+PqdooZAG2Eo7lOXbwxAPPEFdcDEkGklCdE16Tfhm5SZKnXfhF1PA Q/04uuo3OOo4I9NpKXV9O2Gxo303aILrP8CD/2W+7d3YGEjvwK46/T+tHv/MDSEb RkECVItzet910+Ma02/NkttwFIuzVny0PvoDFbaJpW7FsccEe9xw6IVErbmAVghi g5+0qqewfUODVmrf5kxPijQLJT3IsKZuPigW7asywpk/q3UkLLOFMSpmelTORXdZ IjY+UlWwZ5e/v7Noqmqoyw5KV+FC3w12iEVa0jhWbjwtxIR8/sk= =Zsbd -----END PGP SIGNATURE-----